I have a production application that uses ASP .NET 2.0 (C#) and AJAX 1.0 RC which dynamically assembles a page and displays content. I installed AJAX 1.0 RC (the corrected build which allows pre-compiled website to be published) on my production server and deployed my application (AJAX controls used in my app are UpdatePanel and Timer controls). The site was working fine for 3 days and then suddenly I started getting request timed-out. I just changed the timer refresh settings from 7 seconds to 10 seconds in my web.config and the app started working fine (may be because the change in web.config recompiled the app). Again after a couple of days I was getting request timed-out. I thought AJAX was the culprit and removed that functionality from my app and re-deployed it on production. I did not remove the AJAX references in web.config.
Even after removing the AJAX piece from my code I was getting request timed-out error again after 2-3 days. Then I thought that there was some footprint of AJAX left in my app and hence I uninstalled the AJAX 1.0 RC from my production server and also removed the following section from web.config -
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Everything seemed to be working fine for 24 hours when suddenly my site was completely down. I was getting the error -
The file '/Default.aspx' has not been pre-compiled, and cannot be requested.
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I checked out lots of blogs and forums to find out what caused this error and some of them mentioned that the application was referring to some dlls that were not present. When I took a closer look at my web.config, I saw a few more references to AJAX left out -
<pages enableEventValidation="false" enableViewStateMac="false" viewStateEncryptionMode="Never">
<controls>
<add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
</controls>
</pages>
<buildProviders>
<add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider"/>
</buildProviders>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
I just went ahead and deleted all these lines from my web.config and now my app seems to be running fine without issues. But I'm not sure if this really fixed all my issues or if its just a temporarily cure. What is the guarantee that the problem will not resurface? Have I removed the right extensions from my web.config? There are no other 3rd party controls that I'm using on my application. I would appreciate if someone could shed some light on what the real error is when I get "The file has not been pre-compiled, and cannot be requested" and how to make sure that it does not happen again... Thanks in advance...
Hi, mramani
It seems difficulty for solve. This reference may be helpful to you:
http://forums.asp.net/thread/1336283.aspx
Hope this helpful.
0 comments:
Post a Comment