C#.NET & ASP.NET: Application throws exceptions

We have an ASP.NET application that throws an exception serveral times a day for unknown reasons. The server resource monitors are showing plenty of memory and CPU available during the exceptions. Hoping someone can shed some light on what might be causing this.

Below are the two crash dumps and error messages:

Errors: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Level 0: CorpName1.Domain.DomainObjectLoadException
AffectedObject: C05961 - CompanyName Ins 
Message: Could not load object of type Business Entity.  
Dump for object of type CorpName1.AppName.Shared.Domain.Entity
ToString() == C05961 - CompanyName Ins Id = 8783 Main Values:
Preferred Entity External Id =
Code = C05961
Alt Referral Fee Payee = <NULL>
Alt Disb Payee Address Entity = <NULL>
NAIC Number =
A.M. Best Rating =
e-Payment Fee =
CC Payment Fee =
Insured CC Payment Fee =
Insured e-Payment Fee =
Import Code =
Name 1 = CompanyName Ins Name 2 = Name 3 = Entity DataVersionValue: 2 Loading
AutoRegistered: True
IsDependent: False
DoesStateChangeRequireAccept: False

TargetSite: Void _loadDomainObjectChildren(CorpName1.Domain.DomainObject)
Source: CorpName1.Mapper
	at CorpName1.Mapper.AbstractMapper._loadDomainObjectChildren(DomainObject obj)
	at CorpName1.Mapper.AbstractMapper.LoadAll(IDataReader rdr, String idColName)
	at CorpName1.AppName.Shared.Mapper.EntityMapper.SearchByBothCodesAndName(String strSearch)
	at CorpName1.AppName.WebApp.EntityLookupHandler.PerformLookup(String strSearch) in D:\I1Source\Applications\AppName\WebSite\CorpName1.AppName.WebApp\LookupHandlers\EntityLookupHandler.cs: line 130
	at CorpName1.Web.UI.Controls.I1LookupProcessor.ProcessRequest(XmlDocument CorpName)
	at CorpName1.Web.Handlers.XmlHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
	at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
	at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Level 1: CorpName1.Domain.DomainObjectLoadException
AffectedObject: Notice Delivery Configuration
Message: Could not load object of type Notice Delivery Configuration.  
Dump for object of type CorpName1.AppName.Shared.Domain.Notices.Delivery.NoticeDeliveryConfiguration
ToString() == Notice Delivery ConfigurationId = 2916 Main Values:
Persisted State: Clean, DataVersionValue: 1 Loading
AutoRegistered: True
IsDependent: False
DoesStateChangeRequireAccept: False

TargetSite: Void _loadDomainObjectChildren(CorpName1.Domain.DomainObject)
Source: CorpName1.Mapper
	at CorpName1.Mapper.AbstractMapper._loadDomainObjectChildren(DomainObject obj)
	at CorpName1.Mapper.AbstractMapper.LoadAll(IDataReader rdr, String idColName)
	at CorpName1.AppName.Shared.Mapper.EntityMapper.SearchByBothCodesAndName(String strSearch)
	at CorpName1.AppName.WebApp.EntityLookupHandler.PerformLookup(String strSearch) in D:\I1Source\Applications\AppName\WebSite\CorpName1.AppName.WebApp\LookupHandlers\EntityLookupHandler.cs: line 130
	at CorpName1.Web.UI.Controls.I1LookupProcessor.ProcessRequest(XmlDocument CorpName)
	at CorpName1.Web.Handlers.XmlHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
	at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
	at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Level 2: CorpName1.Domain.DomainObjectLoadException
AffectedObject: Notice Type Default Delivery Configuration
Message: Could not load object of type Notice Type Default Delivery Configuration.  
Dump for object of type CorpName1.AppName.Shared.Domain.Notices.Delivery.NoticeTypeDefaultDeliveryConfiguration
ToString() == Notice Type Default Delivery ConfigurationId = 2672 Main Values:
E-mail Address =
Fax Number =
Postal Address = <NULL>
Do Not Deliver / Merge = False
Persisted State: Clean, DataVersionValue: 3 Loading
AutoRegistered: True
IsDependent: False
DoesStateChangeRequireAccept: False

TargetSite: Void _loadDomainObjectChildren(CorpName1.Domain.DomainObject)
Source: CorpName1.Mapper
	at CorpName1.Mapper.AbstractMapper._loadDomainObjectChildren(DomainObject obj)
	at CorpName1.Mapper.AbstractMapper.LoadAll(IDataReader rdr, String idColName)
	at CorpName1.AppName.Shared.Mapper.EntityMapper.SearchByBothCodesAndName(String strSearch)
	at CorpName1.AppName.WebApp.EntityLookupHandler.PerformLookup(String strSearch) in D:\I1Source\Applications\AppName\WebSite\CorpName1.AppName.WebApp\LookupHandlers\EntityLookupHandler.cs: line 130
	at CorpName1.Web.UI.Controls.I1LookupProcessor.ProcessRequest(XmlDocument CorpName)
	at CorpName1.Web.Handlers.XmlHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
	at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
	at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Level 3: CorpName1.Domain.DatabaseException
Message: An error occured in your request. This error has been logged. Please contact CorpName1 for questions. 
TargetSite: System.Data.DataSet _pNotice_NoticeTypeDefaultDeliveryConfigurationGetDeliveryMethods(CorpName1.Common.NInt32, System.Type, System.String, System.Data.DataTable, System.Data.IDataReader ByRef, System.Data.IDbConnection ByRef)
Source: CorpName1.AppName.Data.Db
	at CorpName1.Mapper.AbstractMapper._loadDomainObjectChildren(DomainObject obj)
	at CorpName1.Mapper.AbstractMapper.LoadAll(IDataReader rdr, String idColName)
	at CorpName1.AppName.Shared.Mapper.EntityMapper.SearchByBothCodesAndName(String strSearch)
	at CorpName1.AppName.WebApp.EntityLookupHandler.PerformLookup(String strSearch) in D:\I1Source\Applications\AppName\WebSite\CorpName1.AppName.WebApp\LookupHandlers\EntityLookupHandler.cs: line 130
	at CorpName1.Web.UI.Controls.I1LookupProcessor.ProcessRequest(XmlDocument CorpName)
	at CorpName1.Web.Handlers.XmlHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
	at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
	at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Level 4: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Class: 20
LineNumber: 0
Number: 53
State: 0
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Data: System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
TargetSite: Void OnError(System.Data.SqlClient.SqlException, Boolean)
	at CorpName1.Mapper.AbstractMapper._loadDomainObjectChildren(DomainObject obj)
	at CorpName1.Mapper.AbstractMapper.LoadAll(IDataReader rdr, String idColName)
	at CorpName1.AppName.Shared.Mapper.EntityMapper.SearchByBothCodesAndName(String strSearch)
	at CorpName1.AppName.WebApp.EntityLookupHandler.PerformLookup(String strSearch) in D:\I1Source\Applications\AppName\WebSite\CorpName1.AppName.WebApp\LookupHandlers\EntityLookupHandler.cs: line 130
	at CorpName1.Web.UI.Controls.I1LookupProcessor.ProcessRequest(XmlDocument CorpName)
	at CorpName1.Web.Handlers.XmlHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
	at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
	at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Visited Screens : 
11:17:36 AM : home_homesimple_ascx
11:17:41 AM : customerservice_customerservicemanagercontrol_ascx
11:17:42 AM : On tab Summary for account 1020239
11:17:44 AM : customerservice_customerservicemanagercontrol_ascx
11:17:44 AM : On tab Policies for account 1020239
11:17:54 AM : customerservice_customerservicemanagercontrol_ascx
11:17:54 AM : On tab Disbursements for account 1020239
11:19:13 AM : customerservice_customerservicemanagercontrol_ascx
11:19:13 AM : On tab Policies for account 1020239
11:21:09 AM : reports_reportmanagercontrol_ascx
11:21:18 AM : reports_reportmanagercontrol_ascx
11:21:34 AM : reports_reportmanagercontrol_ascx

Open in new window

Errors: System.Data.SqlClient.SqlError: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
Level 0: CorpName1.Domain.DatabaseException
Message: An error occured in your request. This error has been logged. Please contact CorpName1 for questions. 
TargetSite: System.Data.DataSet _pSec_MessageFindByPortfolioMessageTypeId(CorpName1.Common.NInt32, CorpName1.Common.NInt32, System.Type, System.String, System.Data.DataTable, System.Data.IDataReader ByRef, System.Data.IDbConnection ByRef)
Source: CorpName1.AppName.Data.Db
	at CorpName1.AppName.Data.Db.Sprocs._pSec_MessageFindByPortfolioMessageTypeId(NInt32 messageTypeId, NInt32 portfolioId, Type useDatasetType, String tableName, DataTable dataTable, IDataReader& rdr, IDbConnection& conn)
	at CorpName1.AppName.Shared.Mapper.MessageMapper.FindMessageByMessageTypePortfolioID(Int32 messageTypeId, NInt64 portfolioId)
	at CorpName1.AppName.WebApp.Home.MessageBoardModule.Page_Load(Object sender, EventArgs e)
	at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Level 1: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlError: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
Class: 20
LineNumber: 0
Number: 64
Server: AppNameSQL1
State: 0
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
Data: System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
System.Collections.DictionaryEntry
TargetSite: Void OnError(System.Data.SqlClient.SqlException, Boolean)
	at CorpName1.AppName.Data.Db.Sprocs._pSec_MessageFindByPortfolioMessageTypeId(NInt32 messageTypeId, NInt32 portfolioId, Type useDatasetType, String tableName, DataTable dataTable, IDataReader& rdr, IDbConnection& conn)
	at CorpName1.AppName.Shared.Mapper.MessageMapper.FindMessageByMessageTypePortfolioID(Int32 messageTypeId, NInt64 portfolioId)
	at CorpName1.AppName.WebApp.Home.MessageBoardModule.Page_Load(Object sender, EventArgs e)
	at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Control.LoadRecursive()
	at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Visited Screens : 
9:47:42 AM : home_homesimple_ascx
9:48:21 AM : customerservice_customerservicemanagercontrol_ascx
9:48:22 AM : On tab Summary for account 185223
9:48:41 AM : customerservice_customerservicemanagercontrol_ascx
9:48:41 AM : On tab Memos for account 185223
9:48:48 AM : customerservice_customerservicemanagercontrol_ascx
9:48:48 AM : On tab Summary for account 185223

Open in new window

LVL 8
pzozulkaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ess KayEntrapenuerCommented:
the first errors are from LINE 21 CorpName1.Mapper
Looks like its not configured correctly, Seems to be a DomainObject is set to nothing or simply, doesn't exist


Line 4: CorpName1.AppName.Data.Db is the the culprit for the second error
Looks like you dont set the reference to one of your databases correctly, or the program forgets to state which database connection to use.  

you can also see a second message there to back that up on line 21 (A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.))

These are internal program errors you need to run a debugger to find them.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pzozulkaAuthor Commented:
The transport-level error sounds like something EXTERNAL to the program, and sounds like something the network admin should look into, or am I mistaken?
0
Jitendra PatilSr.Software EngineerCommented:
both the above listed errors are related to network related issues,
Error1:

if there is no network available and at the same time your application tries to connect the SQL server then it throws "A network-related or instance-specific error ".

solution:  try the below link
SQL SERVER – FIX : ERROR : (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: )

Error 2: when your application is connected to remote sql server and tries to get data from the server and in between the connection is lost or some problem occurs within sql data transefer between your request then your application receives  "A transport-level error has occurred when receiving results from the server".

This means either the networks has some extra latency, the database is down or you may have too many concurrent connections open to the database. Make sure you are closing all open datareaders.

hope this helps.
0
Ess KayEntrapenuerCommented:
patil is right, but I think this is a programming error not a connection error but it could just be the connection

On line 3 it says
Message: Could not load object of type Business Entity.  


Meaning, its set to nothing. so either it wasn't set correctly, or there was no database to set it to
0
pzozulkaAuthor Commented:
Could the following article be possible? This problem didn't start happening over night, so it's hard to pinpoint what is causing it, but everything was working fine when the VMs had only 2 processors. Then we added three, and slowly over time this started happening.

Recently we added a 4th processor, and it has become a lot worse. Could it be that the CPU ready time is the culprit?

•High CPU ready time (also referred as "%RDY" or "%RDY time")

Note: This information is simplified and its only purpose is to illustrate the cause of the described issue. It should not be referenced outside of the context of this document. Although the example we use here is sufficient to describe the cause of the stated issue, it does not claim to be technically correct in every detail due to the complexity of the CPU scheduling process for virtual machines.

This example is based on these assumptions:

¿An ESXi 5.0 host with a hyper-threading enabled quad-core CPU, resulting in 4 physical and 8 logical CPUs
¿A Windows 2008 R2 virtual machine with 4 virtual CPUs
¿Three Windows 2003 virtual machines with 2 virtual CPUs each

In this configuration, the ESXi host exposes 8 logical CPUs as 10 virtual CPUs to the virtual machines. In other words, the ESXi host is overcommitted. Depending on the utilization of the virtual machines, the ESXi host will not be able to provide all virtual machines with the requested CPU time, thus the performance of the virtual machines will be as expected. However, if the load on multiple virtual machines increases, the ESXi host has to decide which virtual machine will be served first with the currently available CPU time. It is important to note that the ESXi host will serve multi-core virtual machines only when it is able to serve all the virtual CPUs from the particular virtual machine at once. Otherwise a virtual machine with a lower number of virtual CPUs will be served first. Although this is how the CPU scheduler is supposed to work, it can also lead to situations where certain virtual machines have to wait for an unreasonable amount of time for the requested CPU time. In such cases you can observe a degraded overall performance and increased response times. For more information about CPU scheduling and the meaning of the CPU %RDY time, see the VMware Technical Paper, Performance Troubleshooting for vSphere 4.1.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2008925
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.