Hi Crispy,
Thanks i solved this Problem it was not in categories.
i replace my Dataprovider.vb function and now its working but i didn't figure out what was the problem
here is function which i replaced
Public Shared Shadows Function Instance() As DataProvider
Dim strCacheKey As String = [NameSpace] & "." & [ProviderType] & "provider"
' Use the cache because the reflection used later is expensive
Dim cache As System.Web.Caching.Cache = System.Web.HttpContext.Current.Cache
If cache(strCacheKey) Is Nothing Then
' Get the provider PDConfiguration based on the type
Dim objProviderKBConfiguration As DotNetNuke.Framework.Providers.ProviderConfiguration = DotNetNuke.Framework.Providers.ProviderConfiguration.GetProviderConfiguration([ProviderType])
Try
' Override the typename if a ProviderName is specified ( this allows the application to load a different DataProvider assembly for custom modules )
Dim strTypeName As String = [NameSpace] & "." & objProviderKBConfiguration.DefaultProvider & "," & [AssemblyName] & "." & objProviderKBConfiguration.DefaultProvider
' Use reflection to store the constructor of the class that implements DataProvider
Dim t As Type = Type.GetType(strTypeName, True)
' Insert the type into the cache
cache.Insert(strCacheKey, t.GetConstructor(System.Type.EmptyTypes))
Catch e As Exception
Throw e
End Try
End If
Return CType(CType(cache(strCacheKey), ConstructorInfo).Invoke(Nothing), DataProvider)
End Function
Now i am using this function
' singleton reference to the instantiated object
Private Shared objProvider As DataProvider = Nothing
' constructor
CreateProvider()
Shared Sub New()End Sub
' dynamically create provider
objProvider =
Private Shared Sub CreateProvider()CType(Framework.Reflection.CreateObject("data", "PowerDirectory.Data", "PowerDirectory"), DataProvider)End Sub
' return the provider
Public Shared Shadows Function Instance() As DataProviderReturn objProviderEnd Function