Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for 'DnnContactos.Data.Data
Previous
 
Next
New Post
12/3/2008 8:40 PM
 

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 =

 
New Post
12/4/2008 2:10 PM
 

 Hi everyone, finally i found the error, in this year i began to develop DNN modules with DNN 3.0.13 for the .net framework 1.1 and in it you just put in createprovider method like this:

CType(Framework.Reflection.CreateObject("data""DnnContactos.Data""DnnContactos"), DataProvider)

this is because we create two differents projects, one for the business logic and presentation layer and another for the Dataprovider, both project inside a visual studio solution.

but in the DNN 4.9 only exists one project that contain the presentation layer, the business layer and the dataprovider layer, so to create a dataprovider should do in this form:

CType(Framework.Reflection.CreateObject("data""DnnContactos.Data"""), DataProvider) without especify the assambly, because are in the same assambly. That is the way i do it and now i can use the module well.

 

thanks.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for 'DnnContactos.Data.Data


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out