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.
Source: TlcCorporateBase
Stack Trace: at TlcCorporateBase.Business.CustomerList..ctor(SystemTypes rnListType) at Tlc.Controls.CustomerList.SetList() in c:\inetpub\wwwroot\tlc\controls\customerlist.ascx.cs:line 130 at Tlc.Controls.CustomerList.RequestList(CustomerListCommandEventArgs e) in c:\inetpub\wwwroot\tlc\controls\customerlist.ascx.cs:line 116 at Tlc.customerListings.CustomerListRequested(Object sender, CommandEventArgs e) in c:\inetpub\wwwroot\tlc\customerlistings.aspx.cs:line 131 at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain()
Other Detail: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied. at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at TlcDataAccess.DataGetter.RunQuery(String query) in C:\Documents and Settings\martins\My Documents\Visual Studio Projects\TlcManager\TlcDataAccess\DataGetter.cs:line 85 at TlcCorporateBase.Business.CustomerList..cctor() in c:\documents and settings\martins\my documents\visual studio projects\tlcmanager\tlccorporatebase\customerlist.cs:line 38
0
szopdog
3/25/2004 12:35:24 PM
asp.net.web-forms 93655 articles. 3 followers. Follow

2 Replies
262 Views

Similar Articles

[PageSpeed] 28

Hmm. The text of the exception and the fact that it only happens occasionally suggests that it is a problem with connection pooling. What is your timeout set to? IOW, how long will ADO.NET wait for an available connection?

This suggests that you are either doing some very intense database processing that is tying up connections, or you are not releasing connections in a timely way in your app.
A good way to get to the bottom of this would be to use the Windows Performance Monitor to watch the number of connections to the db under load. Is it using as many as you expect? Are they being released?
Also, check the event logs on both the Web and SQL Server servers to see if there are any clues there around the times you get the exception.
Don
Don Kiely, MCP, MCSD
In the Last Frontier, Interior Alaska
Please post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem!
0
donkiely
3/27/2004 6:15:02 PM
DonKiely,

Thanks for your reply. I did a sweep of my code and found one connection i was not closing.
Its closed now and i hope that it has resolved the problem.
Thanks again for your suggestions.
0
szopdog
3/29/2004 12:02:03 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...

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...

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...

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 nul...

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...

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..  ...

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...

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...

Web Methodst that returns DataTable gives me exception error " "circular reference was detected while serializing an object of type""
Hello, I am getting this error "circular reference was detected while serializing an object of type". The Method GetRecords() is a function that returns DataTable type.. It happens the same thing when i return DataSet as well. Any help? Thanks    function GetStatusRecord() {   // Invoke the Echo method on the server.PageMethods.GetRecords('1', onComplete);  debugger; // Callback function.function onComplete(result) { // Display the echoed string. alert(result); }   return false }   The latest version of Asp.net Ajax no lo...

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...

Upgrade DNN 3.0.13 -> 3.1.0 error: The type initializer for "DotNetNuke.Data.DataProvider" threw an exception
I tested the upgrade on a test system and worked fine. But now I have published the code to upgrade the production site and receive this following error:  Server Error in '/' Application. Value cannot be null. Parameter name: type Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: typeSource Error: An unhandled exception was generated during ...

Web resources about - The type initializer for "TlcCorporateBase.Business.CustomerList" threw an exception - asp.net.web-forms

Resources last updated: 1/3/2016 1:48:41 PM