System.TypeInitializationException: The type initializer for "Test.Form.DataProvider" threw an exception. --->

 Hi

I am getting an exception  whenever I add a new function  or sub procedure  to   Data provider class in  a module development. 

I am developing  a form module  its name as  Test.From.

 

The  exception  report follows

 

DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for "Test.Form.DataProvider" threw an exception. ---> System.TypeInitializationException: The type initializer for "Test.Form.DataProvider" threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey) in C:\First\DotNetNuke_3.2.2_Source\components\Shared\Reflection.vb:line 99 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName) in C:\First\DotNetNuke_3.2.2_Source\components\Shared\Reflection.vb:line 71 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) in C:\First\DotNetNuke_3.2.2_Source\components\Shared\Reflection.vb:line 45 at Test.Form.DataProvider.CreateProvider() in C:\First\DotNetNuke_3.2.2_Source\DesktopModules\Test.Form\Components\DataProvider.vb:line 17 at Erad.Form.DataProvider..cctor() in C:\First\DotNetNuke_3.2.2_Source\DesktopModules\Test.Form\Components\DataProvider.vb:line 12 --- End of inner exception stack trace --- at Erad.Form.DataProvider.Instance() at Erad.Form.MainController.GetPageId(Int32 TestId) in C:\First\DotNetNuke_3.2.2_Source\DesktopModules\Test.Form\MainController.vb:line 23 at Test.Form.MainForm.PopulateBody() in C:\First\DotNetNuke_3.2.2_Source\DesktopModules\Test.Form\MainForm.ascx.vb:line 134 --- End of inner exception stack trace ---

 

 

 

Now with out  adding any function my module will work normally .but I want to get some specified task so 1 will add   a function   then that time error will shows.  The exception  will generate from  previous working functions.  So I can’t add a new function in abstract Data Provider class. I don’t know why this is happening.

 

Thanks In Advance

Navin


Navin
Abstract
0
navinc80
7/16/2006 12:42:53 PM
asp.net.dotnetnuke 25171 articles. 0 followers. Follow

1 Replies
588 Views

Similar Articles

[PageSpeed] 29

Hello.

I need more information about your error. Could you show me your DataProvider and SqlDataProvider classes ?

Try to use debugger on method CreateInstance() of your DataProvider class. Tell me where (in which lines of code of this method) you receive null values.
0
FlatBurgerLabs
7/18/2006 1:27:14 PM
Reply:

Similar Artilces:

Regarding exception -Message "The type initializer for "eradllc.maindbtest.DataProvider" threw an exception." String
Hi I am facing following exception when developing a module ie,                       Message               "The type initializer for "eradllc.maindbtest.DataProvider" threw an exception."          String       .This is when I want to send two string values(textbox values with a button click)  to database. I am sending my code .my namespace is eradllc.maind...

Module development of DNN i am facing following issue -Exception Message "The type initializer for "eradllc.maindbtest.DataProvider" threw an exception." String
 Message "The type initializer for "eradllc.maindbtest.DataProvider" threw an exception." String   in this   eradllc.maindbtest as my namespace .i found issue by inserting two string values to database.provider name is correct. it is generating from   createprovider().the dataprovider,namespace,assembly name all are correct.   pls help  NavinAbstract...

Type Initializer for "System.Net.IpAddress" threw an exception
Apologies - I posted this in the GD forum by mistake instead of here... .... System: Windows XP Professional The other day I had a perfect working copy of Web Matrix on which I am developing an MS SQL based package. Then,  two things happened. The first is that my Outlook 2000 Premium was reconfigured to collect and send mail via an Exchange Server as well as my normal POP3 based system.  The second is that a Blue Tooth mouse was installed. Now,  whenever I load a source file into WebMatrix and press the 'F5' key to launch the web server I get this error: "The Type...

Type Initializer for "System.Net.IpAddress" threw an exception
.... System: Windows XP Professional The other day I had a perfect working copy of Web Matrix on which I am developing an MS SQL based package. Then,  two things happened. The first is that my Outlook 2000 Premium was reconfigured to collect and send mail via an Exchange Server as well as my normal POP3 based system.  The second is that a Blue Tooth mouse was installed. Now,  whenever I load a source file into WebMatrix and press the 'F5' key to launch the web server I get this error: "The Type Initializer for 'System.Net.IpAddress' threw an exception" and the following...

HelloWorld tutorial: The type initializer for "DotNetNuke.Data.DataProvider" threw an exception
Hello All,I've been struggling for the last few days trying to complete the HelloWorld module tutorial from dnnJungle using DNN 3.0.13 and Visual Studio 2002.  I think this would have all been much easier if I had VS2003 (time spent converting project files, solutions files, wizard files, fixing over 300 syntax errors, installing 1.1Framework, uninstalling 1.1Framework, re-installing 1.1Framework, etc.)Anyway, I'm at the last step of the tutorial which is creating the HelloWorldOptions.ascx page and now I've hit another glitch.  When I try to open the page in designer I g...

Unit test causes exception "The type initializer for 'XXX' threw an exception" when running code which accesses appSettings of the webconfig
I have a method which I want to unit test, the code inside that method accesses the appSetting to get the connectionString : System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"].ToString(); this piece of code works fine , but when  I m doing the unit test to test the method, the above line gives the below exception :MyMethod threw exception:  System.TypeInitializationException: The type initializer for 'XXX' threw an exception. --->  System.NullReferenceException: Object reference not set to an instance of an object..  ...

the type initializer for "System.Web.CompilationLock" threw an exception
I build a web application using VS2008 Pro. When the project is set to use IIS Web Server then all the aspx pages even Master pages get this error (first line of page) when viewing under VS2008 Design: "the type initializer for "System.Web.CompilationLock" threw an exception" <%@ Page Language="C#" MasterPageFile="~/master/Educ.Master" AutoEventWireup="true" CodeBehind="AdminMain.aspx.cs" Inherits="ESI.forms.admin.AdminMain" Title="Admin Main Page" %> It only happens with IIS Web Server setting. Is ther...

HELP! type initializer for "System.Xml.Res" threw an exception.
Running DNN 3.1.0, everything has been great til this morning.  I added a page in a child portal, added a Text/HTML module, edited (pasted) a small script, clicked update and got the following error:An error has occurred.DotNetNuke.Services.Exceptions.PageLoadException: Exception of type System.OutOfMemoryException was thrown. ---> System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown. --- End of inner exception stack trace --NEVER MIND..... Whatever it was cleared up in about ten minutes (after I panicked) and seems to be ok....

The type initializer for "Russell.Modules.CustomWear.DataAccessLayer.DataProvider" threw an exception
The type initializer for "Russell.Modules.CustomWear.DataAccessLayer.DataProvider" threw an exceptionHi I'm coverting one of my custom Modules to 3.1For this module i have three Modules (Just presentation layers) Using the same BLL and DAL in their own projects.Like everyone who seems to have this problem the error seems to be in my dataprovider classThe two assemblies that the three presentation modules use are:Russell.Modules.CustomWear.dll   andRussell.Modules.CustomWear.SqlDataProvider.dllThe namespace for both my dataprovider class and my sqldataprovider class is: Russell.Mod...

The type initializer for "..." threw an exception.
I am creating a custom module. when i get this error when trying to connect to the SQL Database "The type initializer for "Custom.CustomModules.DataProvider" threw an exception. I read somewhere that this should be .SQLDataProvider.  Can any one help me with this. This is usually found when either your sql dataprovider is not on the bin folder or you named it differently than what is expected (given the name you used in your dataprovider.vb code). Thanks I have solved this problem but now I am getting "Cast from string "CustomList" to type 'Integer...

The type initializer for "TlcCorporateBase.Business.CustomerList" threw an exception
Hi, i really hope you can help me. Below is the error i'm getting. A few weird things about it: >it only happens once in a while--kind of a out of the blue thing >the underlining exception claims that the sql server does not exist or access is denied but the error happens only on this one page and not on others that also access the same sql server in the same way >the only way to get rid of the error is to reboot the machine. Please help if you can. Message: The type initializer for "TlcCorporateBase.Business.CustomerList" threw an exception....

Page.Request threw an exception of type "System.NullReferenceException"
I can't figure out what I am doing wrong here. I have a simple page with 2 buttons, a label (Label1) and a hidden field (curCategoryID). The first button executes the following script:--------document.forms["form1"].elements["curCategoryID"].value = 'sdvs'--------The second button just submits the form, on which I have the following code:-------- protected void Page_Load(object sender, EventArgs e){    if (Page.IsPostBack) Label1.Text = Request.Form["curCategoryID"].ToString();}--------and for some reason the "Request" is throwing a nullReferenceException. Any idea ...

Converting a type "void" to a type "System.Drawing.Image"
I'm trying to input a thumbnail image in to a a image control.  I keep getting the same error "Cannot implicitly convert type void to type System.Drawing.Image".  I'm coding in C# I've been looking throught object browser to try to find a way to convert the type but it is not working. can anyone help   Hi, could it be that method has incorrect return type? is it your own method raising it? Post some code.Thanks,Teemu KeiskiFinland, EU Here is the code:  The error is commented.  public static bool ThumbNailCallBack() { return false; } public s...

Uninstall of MPF Engine Error (The Type initializer for "Microsoft.Provisioning.DeploymentTool.Engine.FileLocations" threw an exception
Hello,I was uninstalling the MPF Enginer from my server using CD. I got error message saying "The Type initializer for "Microsoft.Provisioning.DeploymentTool.Engine.FileLocations" threw an exception". I copied the full content of CD and put it on local harddrive of machine so that it can find all the files locally. But it still gave same error. Can anyone please help me.Thank you for help,Jinesh Shah.Here is part of error log:************** Exception Text **************System.TypeInitializationException: The type initializer for "Microsoft.Provisioning.DeploymentTool.Engine.FileLocation...

"Net use" not working in application that runs as "system"
Hello, I am trying to create an application object to distribute a program which during the setup procedure creates two local users on the workstation. I tried to set up the application to run as an unsecure system user and start the setup.exe. This method worked fine for quite a number of apps in the past. However this app needs a drive mapping to a windows 2003 server to start the setup.exe. Apparently under windows 2003 it is no longer possible to use the "net use" command when running a script as system user. I get system error 1312 "A specified logon ses...

Web resources about - System.TypeInitializationException: The type initializer for "Test.Form.DataProvider" threw an exception. ---> - asp.net.dotnetnuke

Resources last updated: 12/21/2015 3:45:16 PM