Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 485 Vote(s) - 3.61 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix ASP.NET error "The file 'nnn.aspx' has not been pre-compiled, and cannot be requested."?

#1
I have a VS 2005 web site that I publish using "Publish Web Site", and I clear all the three checkboxes. I also have a deployment project that picks up the published files and creates an MSI. I then install the package on a separate test server.

In other words, the whole site is pre-compiled. However, when I go to any .aspx file in a specific subfolder named "Services", I get an HttpException:

>System.Web.HttpException: The file '/myapp/Services/mypage.aspx' has not been pre-compiled, and cannot be requested.

If I go to an .aspx file in an other folder, be it the root or other subfolder, it works properly.

The contents of mypage.aspx itself is: `<%@ Page Language="C#" AutoEventWireup="true" CodeFile="mypage.aspx.cs" Inherits="Services_mypage" %>"`

In the `/myapp/bin` folder I can see a `mypage.aspx.989dc2fb.compiled` file. The content of this seems to point to a certain assembly that is also present in the bin folder.

Why is this error occurring? The .compiled file is there, and the assembly is there, and the type in question is present in that assembly (I can see it in Object Browser). Is it something about the name or the content of the .compiled file? Do I have the wrong version somehow? What does the seemingly random number in the .compiled filename mean and is it important?

I also want to mention that this issue appeared suddenly, and I'm not sure what changes there can have been done since it worked properly a few days ago (but to the best of my knowledge, none).
Reply

#2
It turned out to be a missing (non-web) DLL in the MSI, which I assume was used by the pages giving the error. A quite misleading error message I'd say, as the page was certainly precompiled, but had a missing reference to that DLL.
Reply

#3
Redeployment of the same files also fixed this issue in my case.

So maybe before trying anything else first try to deploy you app again (bin folder content should be enough)

BTW: In my case the error started when C drive run out of space.

Happy coding!
ChiTec
Reply

#4
Just as a footnote to all of the above answers that resolved the issue via republishing to replace a missing assembly... While i have solved this issue previously with that same solution, i have just encountered another reason for it's occurrence which may assist others.

The AppPool that my site was running under had it's "Enable 32-bit applications" setting set to false. By changing this to true via the "Advanced Settings" dialog of the app pool i resolved my issue.

Hope that helps some other poor sucker.
Reply

#5
I know the error is complaining about something else but I promise in my case the problem was just the **insufficient Access permission**(Network Service or Application Pool identity or IUSR) for asp.net account to work with that specific file.

it was due to **unusual deploying** and mixing bin files with new published ones in our VPS environment.


**solution**:

that specific file permissions need to be replaced with correct Bin folder permissions like other files that are working correctly(and wo that error) inside Bin.

![enter image description here][1]




[1]:
Reply

#6
I got this error when I upgraded a site from 2.0 to 4.0. The error was caused by a file `PrecompiledApp.config` in the site's `root` directory. Once I deleted that file, the site started working.
Reply

#7
i was facing this problem when i deployed some changes to my existing site.

To recover from the issue i deleted all files from bin folder and redeployed them.

The issue then resolved.

I hope this may be help some one.
Reply

#8
This error has occurred to me, and I solved it.

When you want to publish your site, check use fixed naming and single page assemblies in Visual Studio

You'll see this problem will be solved!
Reply

#9
We fixed this by restarting the AppPool, after trying several of the other solutions. Republishing was not an option on this occasion.
Reply

#10
In my case I was not uploading the common DLLs like AjaxControlToolkit.dll, Telerik.dll etc.
I uploaded the whole published folder and it fixed it for me.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through