views:

1705

answers:

4

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).

+1  A: 

I've not had that error, but after a little Googling I came across this link, I'm not sure if you've seen it yet: http://forums.asp.net/t/956297.aspx

People were reporting that missing assemblies on the destination server ended up being the root cause, in their cases, but they had the same error as you. Weird.

Maybe that's the problem?

Carl
+1 for the missing assemblies hint (in my case a few assemblies have been deleted from GAC)
Marek Grzenkowicz
+1  A: 

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.

jonsb
A: 

Hi guys,

I had the same problem today. Some forums tell about there is are missing reference in your website and it certainly does in your case. Despite you have all the necessary assemblies included, you might been deploying your website in a IIS server with 3.5 framework, right?

Well it was my case, so I copied the web.config file from an original ASPX 3.5 website and modified some parts (removed other 3.5 assembly references) and try deploy it again.

Regards,

Esteban Solano G. SJ, Costa Rica

Esteban Solano Granados
A: 

Hi there,

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... :)

Regards,

WeHelps

WeHelps