Link to home
Start Free TrialLog in
Avatar of ktola
ktola

asked on

Why is IIS Crashing With This Message?

I have an ASP.NET website that has been running fine for about 16 months until I "upgraded" it to start using the .NET 4.0 framework and I started building the codebase in Visual Studio 2010.

Now IIS crashes all of the time and it gives me the same error when it crashes (see below) despite the fact that this line is already in my web.config file.  The only way I can fix this issue is to turn off IIS, try browsing to the page (thus getting a website not found) and then turning IIS back on.

At first I thought this only occurred when I posted new code but now it is happening even when the code is not touched.

I am running IIS 7 on a Windows 2008 server using the ASP.NET v4.0 Application Pool (not the classic).  When the site goes down, it no longer appears to be registered to the application pool but when I perform the steps above, it once again appears in the Application Pool and the site works once again...

Please help!
Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

Open in new window

Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

The message is telling you that you need to either browse to the page on the server, or turn custom errors off, in order to see the actual error message.

If you change your config line to the following then you should at least get the underlying error:
<customErrors mode="Off" defaultRedirect="mycustompage.htm"/>

Open in new window

Avatar of ktola
ktola

ASKER

Sorry - I copied in the wrong error - I usually get something about missing an HTTP Handler but niether error is actually relevant.
 
THe problem has something to do with the site getting deregistered from the ASP v4.0 Application Pool.  When I look at the application pool listing, when the site is down, the pool lists 0 applications.  When I stop and restart IIS - thus getting the site to work again - the application pool shows 1 application which is this website.
What could be causing the application pool to drop the website like that?
Avatar of ktola

ASKER

Here is the actual error...but again it is not REALLY the issue
Avatar of ktola

ASKER

Hmm - the code did not attached...
Server Error in '/' Application.
--------------------------------------------------------------------------------

The WebResource.axd handler must be registered in the configuration to process this request.

<!-- Web.Config Configuration File -->

<configuration>
   <system.web>
       <httpHandlers>
           <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
       </httpHandlers>
   </system.web>
</configuration> 
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.InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request.

<!-- Web.Config Configuration File -->

<configuration>
   <system.web>
       <httpHandlers>
           <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
       </httpHandlers>
   </system.web>
</configuration>

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <httpHandlers>
            <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
        </httpHandlers>
    </system.web>
</configuration>]
   System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager) +4100334
   System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager) +860
   Telerik.Web.SkinRegistrar.ResolveStyleSheet(StyleSheetReference styleSheet, Page page, EmbeddedSkinAttribute attribute) +280
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +452
   Telerik.Web.UI.RadWindowManager.ControlPreRender() +753
   System.Web.UI.Control.PreRenderRecursiveInternal() +113
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ktola

ASKER

It always occurs when I first access the site in that once I am on the site it never goes down.  That said, when it crashes is completely random - sometimes after a code push, yet I could do 100 code pushes with no ill effects.  Other times the site will not be touched for days and it will randomly go down.
Thank you for finding that article - I added in the Global.asax option and I will see if it helps!  I will respond back by Monday if there are no issues - otherwise I will get back sooner:(!
Avatar of ktola

ASKER

Thank you for those two additional links but my web.config is setup just fine and I am running under the 4.0 framework - this literally  has to do with the application pool losing the website for some unknown reason.
Avatar of ktola

ASKER

I think this did the trick1  So far the site has not crashed - fingers crossed!  Thanks.
Avatar of ktola

ASKER

Spoke too soon - the site just crashed again.  I am REALLY lost on how to fix this issue...
Avatar of ktola

ASKER

If anybody is looking for the solution, please read the following post - http://blog.fredrikhaglund.se/blog/2008/08/26/solution-to-webresourceaxd-exception/
In short, move the following line to the very top of your HTTPHandler section (and move its equivalent if you are using IIS 7 or above in the web server section):
 <add name="WebResource.axd" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />