Showing posts with label netapplication. Show all posts
Showing posts with label netapplication. Show all posts

Wednesday, March 28, 2012

System.InvalidOperationException: Application is restarting

Hi All,

I am getting the following exception in an ASP.NET
application.

Exception Details: System.InvalidOperationException:
Application is restarting.

I have been to the following Support page

http://support.microsoft.com/default.aspx?kbid=312592

and disabled the Realtime monitoring. But, I was not able
to solve the issue.

Any suggestions are greatly appreciated.

Thanks a lot in advance,

Regards
HariHi,

There are vast spectrums of situations that can cause application
restarting. I suggest that you find first the line that causes
application to restart. Start with simple application to check out if
this problem is application specific. If this is the case and other
application doesnt cause recycling you should find the application line
that cause recycling.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Thanks Natty for your prompt reply. Unfortunately I don't
have the real access to the code at the moment and I am
kind of new to ASP.NET. But, I understand the technology
well.

The following is the exception I was getting when this
error occurs: Please have a look if it makes sense. Any
advice from your side is greatly respected.

************************************************** *******
Source=System.Web

Message=Application is
restarting.
StackTrace= at
System.Web.Compilation.CompilationMutex.WaitOne()
+282
at System.Web.Compilation.CompilationLock.GetLock()
+13
at System.Web.UI.TemplateParser.GetParserCacheItem()
+64

at

System.Web.UI.TemplateControlParser.CompileAndGetP arserCac
heItem(String
virtualPath, String inputFile, HttpContext context)
+115
at
System.Web.UI.TemplateControlParser.GetCompiledIns tance
(String
virtualPath, String inputFile, HttpContext context)
+36
at System.Web.UI.PageParser.GetCompiledPageInstance
(String
virtualPath, String inputFile, HttpContext context) +43
at System.Web.UI.PageHandlerFactory.GetHandler
(HttpContext context,
String requestType, String url, String path) +14
at System.Web.HttpApplication.MapHttpHandler
(HttpContext context,
String requestType, String path, String pathTranslated,
Boolean
useAppConfig)
at System.Web.MapHandlerExecutionStep.Execute()
+78
at System.Web.HttpApplication.ExecuteStep
(IExecutionStep step,
Boolean& completedSynchronously) +173
AllException=System.InvalidOperationException:
Application is
restarting.

at System.Web.Compilation.CompilationMutex.WaitOne
()
at System.Web.Compilation.CompilationLock.GetLock
()
at System.Web.UI.TemplateParser.GetParserCacheItem
()

at

System.Web.UI.TemplateControlParser.CompileAndGetP arserCac
heItem(String
virtualPath, String inputFile, HttpContext
context)
at
System.Web.UI.TemplateControlParser.GetCompiledIns tance
(String
virtualPath, String inputFile, HttpContext
context)
at System.Web.UI.PageParser.GetCompiledPageInstance
(String
virtualPath, String inputFile, HttpContext
context)
at System.Web.UI.PageHandlerFactory.GetHandler
(HttpContext context,
String requestType, String url, String
path)
at System.Web.HttpApplication.MapHttpHandler
(HttpContext context,
String requestType, String path, String pathTranslated,
Boolean
useAppConfig)

at System.Web.MapHandlerExecutionStep.Execute
()
at System.Web.HttpApplication.ExecuteStep
(IExecutionStep step,
Boolean&
completedSynchronously)

************************************************** *******

Any advice on this is greatly appreciated

Thanks you very much

Best Regards
Hari

>--Original Message--
>Hi,
>There are vast spectrums of situations that can cause
application
>restarting. I suggest that you find first the line that
causes
>application to restart. Start with simple application to
check out if
>this problem is application specific. If this is the
case and other
>application doesn't cause recycling you should find the
application line
>that cause recycling.
>Natty Gur[MVP]
>blog : http://weblogs.asp.net/ngur
>Mobile: +972-(0)58-888377
>
>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.
Hi,

Nothing special with excaption stuck. it's regular operations that
called while loading a page. try to delete the temporary directory of
your application under
""C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Tempo rary ASP.NET
Files\YourApplicationName".

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hi,

Nothing special with excaption stuck. it's regular operations that
called while loading a page. try to delete the temporary directory of
your application under
""C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Tempo rary ASP.NET
Files\YourApplicationName".

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Thursday, March 22, 2012

System.OutOfMemoryException in asp.net web application

Hi,

We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.

Could anyone please tell abt the possible causes and solution for this.

Cheers,
JitenOhboy... it could be due to any number of things, without knowing more about
your app it would be very hard to tell what is wrong.
You can wire up your app to capture more info on unhandled exceptions, and
you can also use AdPlus in "hang" mode to take a dump of the W3WP.exe or
ASP_NET.EXE process.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"jiten" wrote:

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>


One of the most common culprits is inproc session management. If you store a
lot of data in session variables, consider switching to outproc sessions.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"jiten" <jiten@.discussions.microsoft.comwrote in message
news:398C0A44-231F-40DC-AF02-E8F6965C655A@.microsoft.com...

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server
needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>


there are a couple causes:

1) too large session
2) memory "leak" of unmanaged resources. common if you use com object or
don't manage sql connections
3) faulty caching.

start here: http://msdn2.microsoft.com/en-us/library/ms954591.aspx
-- bruce (sqlwork.com)

jiten wrote:

Quote:

Originally Posted by

Hi,
>
We are getting System.OutOfMemoryException exception in an asp.net
application hosted on IIS.
The problem is popping up randomly once every few days.The web server needs
to be restarted as users keep on getting 'Server Application Unavailable'
otherwise.
>
Could anyone please tell abt the possible causes and solution for this.
>
Cheers,
Jiten
>
>
>

Tuesday, March 13, 2012

System.Threading.ThreadAbortException and Response.Redirect

I have implemented a log-system for exceptions in an ASP.NET
application using the Application_Error event in Global.asax.
ThreadAbortExceptions gets thrown everytime Response.Redirect is being
used with the second parameter set to true which, according to
Microsoft, is by design...

How do I get around this ? I would hate to have the log filled with
this exception on high-traffic sites. Setting the second parameter to
false is not an option.

I have tried with a try-catch block around the Response.Redirect call,
didnt help, the exception still gets "recorded".A couple options...

a - Don't set the 2nd parameter to true

b - Before logging the exception, check it's type and don't log
ThreadAbortExceptions

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Henrik Stidsen" <henrikstidsen@.gmail.comwrote in message
news:1157013808.231659.114100@.e3g2000cwe.googlegro ups.com...
I have implemented a log-system for exceptions in an ASP.NET
application using the Application_Error event in Global.asax.
ThreadAbortExceptions gets thrown everytime Response.Redirect is being
used with the second parameter set to true which, according to
Microsoft, is by design...

How do I get around this ? I would hate to have the log filled with
this exception on high-traffic sites. Setting the second parameter to
false is not an option.

I have tried with a try-catch block around the Response.Redirect call,
didnt help, the exception still gets "recorded".
Karl Seguin [MVP] skrev:

Quote:

Originally Posted by

A couple options...
a - Don't set the 2nd parameter to true


It would certainly be the easy way - but sometimes the world is not
that easy :(

Quote:

Originally Posted by

b - Before logging the exception, check it's type and don't log
ThreadAbortExceptions


Wouldn't I risk to throw out exceptions that I want to log or is
Response.Redirect the only (built-in) function that throws this
Exception ?
No, it isn't the only function, so yes, you'd risk throwing away meaningful
information.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Henrik Stidsen" <henrikstidsen@.gmail.comwrote in message
news:1157030635.410199.270240@.i42g2000cwa.googlegr oups.com...

Quote:

Originally Posted by

Karl Seguin [MVP] skrev:

Quote:

Originally Posted by

>A couple options...
>a - Don't set the 2nd parameter to true


>
It would certainly be the easy way - but sometimes the world is not
that easy :(
>

Quote:

Originally Posted by

>b - Before logging the exception, check it's type and don't log
>ThreadAbortExceptions


>
Wouldn't I risk to throw out exceptions that I want to log or is
Response.Redirect the only (built-in) function that throws this
Exception ?
>


This will give more clarity: http://support.microsoft.com/kb/312629/EN-US/
"Henrik Stidsen" <henrikstidsen@.gmail.comwrote in message
news:1157013808.231659.114100@.e3g2000cwe.googlegro ups.com...
I have implemented a log-system for exceptions in an ASP.NET
application using the Application_Error event in Global.asax.
ThreadAbortExceptions gets thrown everytime Response.Redirect is being
used with the second parameter set to true which, according to
Microsoft, is by design...

How do I get around this ? I would hate to have the log filled with
this exception on high-traffic sites. Setting the second parameter to
false is not an option.

I have tried with a try-catch block around the Response.Redirect call,
didnt help, the exception still gets "recorded".
Siva M skrev:

Quote:

Originally Posted by

This will give more clarity: http://support.microsoft.com/kb/312629/EN-US/


I have read that - it seems the only way to avoid the exception is
this:
Response.Redirect(NewURL, False)
HttpContext.Current.ApplicationInstance.CompleteRe quest()

That seems like a bad workaround... :/