Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am making a new ASP.NET website and I have brought over the code from an existing website and refactored.

I am using Visual Studio 2010 and IIS 7 and Windows XP SP 3.

It works just fine when I click Debug > Start With Debugging (F5) in Visual Studio and it runs on the development box, no problem.

Then I click Build > Publish Web Site and blank out all the checkboxes and just publish it. When I zip the files up and shoot them to my boss and he puts them on his IIS box, it complains:

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

What I am totally confused about is why am I getting this error when my site works just fine in Visual Studio. Here's the log from IIS:

<pre lang="xml">Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="ASP.NET 2.0.50727.0" />
  <EventID Qualifiers="32768">1309</EventID>
  <Level>3</Level>
  <Task>3</Task>
  <Keywords>0x80000000000000</Keywords>
  <TimeCreated SystemTime="2011-04-20T15:10:25.000000000Z" />
  <EventRecordID>2232</EventRecordID>
  <Channel>Application</Channel>
  <Computer>ADSIIS02.adsalarms.com</Computer>
  <Security />
  </System>
- <EventData>
  <Data>3005</Data>
  <Data>An unhandled exception has occurred.</Data>
  <Data>4/20/2011 10:10:25 AM</Data>
  <Data>4/20/2011 3:10:25 PM</Data>
  <Data>c3e825d0ecef4c99a16454c5f676fb8d</Data>
  <Data>4</Data>
  <Data>1</Data>
  <Data>0</Data>
  <Data>/LM/W3SVC/9/ROOT-2-129477858257656250</Data>
  <Data>Full</Data>
  <Data>/</Data>
  <Data>C:\inetpub\wwwroot\testSecureDoor\</Data>
  <Data>ADSIIS02</Data>
  <Data />
  <Data>1092</Data>
  <Data>w3wp.exe</Data>
  <Data>IIS APPPOOL\testSecureDoor</Data>
  <Data>HttpException</Data>
  <Data>The file '/default.aspx' has not been pre-compiled, and cannot be requested.</Data>
  <Data>http://10.0.1.221:8082/default.aspx</Data>
  <Data>/default.aspx</Data>
  <Data>10.0.1.8</Data>
  <Data />
  <Data>False</Data>
  <Data />
  <Data>IIS APPPOOL\testSecureDoor</Data>
  <Data>8</Data>
  <Data>IIS APPPOOL\testSecureDoor</Data>
  <Data>False</Data>
  <Data>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.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</Data>
  </EventData>
  </Event>


Does anybody have a clue as to what I might be doing wrong? Thanks in advance.
Posted
Updated 20-Apr-11 7:01am
v2

Mostly it occurs because of a missing assembly. Have a look at this similar discussion here[^].

Then it could be incorrect configuration of .NET Framework. Check in your IIS that website is configured to use the desired framework version.

Another possible reasons are discussed here[^] with similar issue.
 
Share this answer
 
I have same problem come I add .dll in bin folder
Some .dll is missing in bin folder Add this .dll to solve this problem
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900