Hi, i'm trying to create a DNN Module using visual studio 2008 and DNN 4.9, but when i tried to insert a new record in the database, dnn show me this error:
Error: DnnContactos is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for 'DnnContactos.Data.DataProvider' threw an exception. ---> System.TypeInitializationException: The type initializer for 'DnnContactos.Data.DataProvider' threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) at DnnContactos.Data.DataProvider.CreateProvider() in D:\Desarrollo\DotNetNuke\DesktopModules\DnnContactos\Components\Data\DataProvider.vb:line 22 at DnnContactos.Data.DataProvider..cctor() in D:\Desarrollo\DotNetNuke\DesktopModules\DnnContactos\Components\Data\DataProvider.vb:line 17 --- End of inner exception stack trace --- at DnnContactos.Data.DataProvider.Instance() at DnnContactos.Business.DnnContactosController.AddContactos(String nombre, String apellidos, String direccion, String telefono, String celular, String email, Int32 moduleId, DateTime fechaCreacion) in D:\Desarrollo\DotNetNuke\DesktopModules\DnnContactos\Components\Business\DnnContactosController.vb:line 27 at DnnContactos.ViewDnnContactos.lnkAgregar_Click(Object sender, EventArgs e) in D:\Desarrollo\DotNetNuke\DesktopModules\DnnContactos\ViewDnnContactos.ascx.vb:line 51 --- End of inner exception stack trace
Looking for this same error in older post, i found that generate on this line:
CType(Framework.Reflection.CreateObject("data", "DnnContactos.Data", "DnnContactos"), DataProvider)
when i put the wrong assambly and the wrong namespace, but i check out and all is fine. so i don´t know what is the problem. I'm using sql server 2005.
i hope you can help me.
regards.
Francisco Cartusciello
objProvider =