Showing posts with label requested. Show all posts
Showing posts with label requested. Show all posts

Thursday, March 22, 2012

The file '/AHSD/MainMenu.aspx' has not been pre-compiled, and cannot be requested.

I am getting the error "The file '/AHSD/MainMenu.aspx' has not been
pre-compiled, and cannot be requested." when I try to deploy one of my
applications that I am just migrating to VS 2005. I have searched on
the web for a solution, but none of the suggestions so far have
worked. Here is my scenario:

I am using Visual Studio 2005 with SP1 installed and I have created a
Web Deployment Project with the following items selected in the
Property Pages:

compliation tab: just defaults, nothing special selected. Output
folder .\Release\
output assemblies tab: Merge all pages and control outputs to a
single assembly (AssemblyName: AHSD.CompiledApplication)
sigining tab: just defaults
deployment tab: just defaults

I created a virutal directory pointing to the Release folder so that I
could see if it worked and it seems to work perfectly. On our server
there was an existing folder called AHSD that used to contain the
files for the application before it was migrated. I deleted all of
the files and copied the new ones. This is when I get the error.

I have made sure that our Network technician has changed the virtual
directory asp.net tab to use Framework 2.0, I asked him to restart IIS
and I have ensured that the additional assemblies that we reference
within the application have been registered in the GAC.

Any other suggestions?On Oct 3, 11:39 am, lds <lisa.stap...@.gnb.cawrote:

Quote:

Originally Posted by

I am getting the error "The file '/AHSD/MainMenu.aspx' has not been
pre-compiled, and cannot be requested." when I try to deploy one of my
applications that I am just migrating to VS 2005. I have searched on
the web for a solution, but none of the suggestions so far have
worked. Here is my scenario:
>
I am using Visual Studio 2005 with SP1 installed and I have created a
Web Deployment Project with the following items selected in the
Property Pages:
>
compliation tab: just defaults, nothing special selected. Output
folder .\Release\
output assemblies tab: Merge all pages and control outputs to a
single assembly (AssemblyName: AHSD.CompiledApplication)
sigining tab: just defaults
deployment tab: just defaults
>
I created a virutal directory pointing to the Release folder so that I
could see if it worked and it seems to work perfectly. On our server
there was an existing folder called AHSD that used to contain the
files for the application before it was migrated. I deleted all of
the files and copied the new ones. This is when I get the error.
>
I have made sure that our Network technician has changed the virtual
directory asp.net tab to use Framework 2.0, I asked him to restart IIS
and I have ensured that the additional assemblies that we reference
within the application have been registered in the GAC.
>
Any other suggestions?


This afternoon, mysteriously this application started working on our
server. Now for some reason the other apps that are still using the
1.1 version of the framework have stopped working. Any ideas why?
On Oct 3, 3:49 pm, lds <lisa.stap...@.gnb.cawrote:

Quote:

Originally Posted by

On Oct 3, 11:39 am, lds <lisa.stap...@.gnb.cawrote:
>
>
>
>
>

Quote:

Originally Posted by

I am getting the error "The file '/AHSD/MainMenu.aspx' has not been
pre-compiled, and cannot be requested." when I try to deploy one of my
applications that I am just migrating to VS 2005. I have searched on
the web for a solution, but none of the suggestions so far have
worked. Here is my scenario:


>

Quote:

Originally Posted by

I am using Visual Studio 2005 with SP1 installed and I have created a
Web Deployment Project with the following items selected in the
Property Pages:


>

Quote:

Originally Posted by

compliation tab: just defaults, nothing special selected. Output
folder .\Release\
output assemblies tab: Merge all pages and control outputs to a
single assembly (AssemblyName: AHSD.CompiledApplication)
sigining tab: just defaults
deployment tab: just defaults


>

Quote:

Originally Posted by

I created a virutal directory pointing to the Release folder so that I
could see if it worked and it seems to work perfectly. On our server
there was an existing folder called AHSD that used to contain the
files for the application before it was migrated. I deleted all of
the files and copied the new ones. This is when I get the error.


>

Quote:

Originally Posted by

I have made sure that our Network technician has changed the virtual
directory asp.net tab to use Framework 2.0, I asked him to restart IIS
and I have ensured that the additional assemblies that we reference
within the application have been registered in the GAC.


>

Quote:

Originally Posted by

Any other suggestions?


>
This afternoon, mysteriously this application started working on our
server. Now for some reason the other apps that are still using the
1.1 version of the framework have stopped working. Any ideas why?- Hide quoted text -
>
- Show quoted text -


Just incase anyone is wondering...we got this app working. It turned
out that this app was using the same application pool as the 1.1
apps. Once we put it in its own applicaiton pool for 2.0 apps it
worked fine.

The file [filename] has not been pre-compiled, and cannot be requested.

I hvae develop a web site. and in this i have use ajax beta2 release it work fine on server but when i upgrade Asp.net Ajax 1.0 with january release. it work fine on my system but when i hvae compile the project and upload this on server then it give me the following error.

The file [filename] has not been pre-compiled, and cannot be requested.

how can i have solve this problem. help me

Hi, amritpal

You can turn this question into asp.net ajax forums for a try. Good luck!

The file has not been pre-compiled, and cannot be requested exception

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.