ASP.NET 2.0 Small Application Locks Up until we run iisreset.. Help!
I recently dev开发者_StackOverflow中文版eloped a simple application for displaying a list of files to some users based on access levels and allowing them to download them etc.
This application was developed to be hosted inside a large corporation with heavy security policies and is fairly mission critical..
The application is very basic,
- it checks the users NTID (using windows authentication)
- compares that to a table in SQL
- then pulls up a list of all the files on which this user has access
Thats pretty much it..
There are also a couple of forms for adding a user and editing a user and uploading a file.
We have a problem often where the application is pretty much unresponsive.
This can be remedied by opening command prompt and running 'iisreset'
I should also note when originally deploying the application we changed some settings on the server to allow connections to stay open a while longer to allow bigger file uploads..
Could this be locking the application up?
I am unabble to restart the server until the weekend.
The server is a windows 2003 box running IIS6.0 and .NET 2.0
Helllllp!
Thanks Daniel
There are very rare cases that one application hangs ups and only iis restart fix it.
This is the cases of infinity loops. So check your code for
Responce.Redirect(onsamepage);
or for
public string sMyText
{
get {return sMyText;}
set {sMyText = value;}
}
or for
protected override void OnLoad(EventArgs e)
{
base.OnInit(e);
}
Haha.. I Feel So Stoopid!
After a morning of writing the stack to log files i found the error..
try
{
//Do Some SQL Stuff Here
//Close SQL Connection
}
catch
{
//Whoops it went Bang!
}
Fixed By Adding this:
finally
{
//Close The Connection Doofus!
}
Whoops!
So Basically if an error happens in the SQL stuff it'll go straight to catch and never close the connection!
Thanks for your help everyone!
If the application is hung, I would recommend using tools to capture memory dumps and analyze it. That would give you a sure shot answer.
Try this... http://aspalliance.com/1350_Post_Production_Debugging_for_ASPNET_Applications__Part_1
Once you are done capturing the dumps, you can check for threads which look hung and what exactly are they doing.
Link
精彩评论