Avatar of ITSLTD
Flag for United Kingdom of Great Britain and Northern Ireland asked on

ASP.Net Application Issues: Random System.Web.HttpUnhandledException Thrown


Recently I have installed a ASP.Net application (coded in VB) on site.  At the moment 2 PC's and several wireless hand held devices are used to connect to the website.

Since installing the application we are having several issues:

System.Web.HttpUnhandledException is thrown quite regularly and we cant seem to work out while this happening.  This is thrown at complete random times.  Most of the time this is caught by the Application_Error() function inside of Global.asax.

One person can log into a page and a minute or two later recieve a System.Web.HttpUnhandledException while another user can access and use the page with no problems.  Logging out and back in seems to fix this most times.

We also seen the following error: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

And Object reference not set to an instance of an object.  This seems to be that session variables are somehow lost.

I have tried looking into these issues but at the moment I dont seem to be getting anywhere.  Not sure if this due to application design or something to do with .Net or IIS configuration.

Any help would be great =:)
ASP.NETVisual Basic.NETWeb Applications

Avatar of undefined
Last Comment

8/22/2022 - Mon

Do you have any error logging/catching set up?  If not, I recommend that you do this.  It will enable you to find precisely where the errors are happening.  

Yes every function in the system has error logging/catching set up.  The above errors are all caught in the logs. =:/

Are you running this app off of multiple servers with load balancing?  A lot of that sounds like connectivity to the db.  Is the database on a separate server, and if so, do you have connectivity issues with that server? You probably have a memory leak in there. Connections not being closed properly. Go through the code and make sure all datareaders, datatable fills, dataset fills, etc are explicitly closed when they're done being used.  One way to tell that is to look at the activity monitor on the db server and view processes (that would be with sql server anyway).

I once didn't close a connection in a recursive function, and completely brought the db server to it's knees.  It happens.  

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

Thank you for the reply.

I shall look into this.

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.