So, here's the scenario: IIS 6.0 on a Windows 2003 Standard SP1. Its a new ecommerce site (http://www.patternworks.com went live on 1/31/07) that replaced an old ASP site. That's not the issue, this is:

When trying to view a page that is not in the site and ends in aspx, it errors. For example, www.patternworks.com/peace.aspx (not real) errors like so

The page cannot be displayed

Explanation: The Web server connection was closed.

Try the following:

  • Refresh page: Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion.
  • Check spelling: Check that you typed the Web page address correctly. The address may have been mistyped.
  • Access from a link: If there is a link to the page you are looking for, try accessing the page from that link.
  • Contact website: You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page.

Technical Information (for support personnel)

  • Error Code 64: Host not available
  • Background: The connection to the Web server was lost.

and in Application Logs in Event Viewer I got this (reported from my application)

The file '/PWShopping/products.aspx' does not exist.
System.Web.HttpException: The file '/PWShopping/products.aspx' does not exist.

at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)

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 have setup in IIS 6.0 in the Custom Errors tab of the website, the 404, 404,2 and 404,3 all setup to send to a specific file (looks pretty to match the site). It works great if you were to try to hit www.patternworks.com/peace.html or peace.asp. Its just those dang aspx files. On top of it all, for some crack pot reason Yahoo! Slurp and Google Bot are trying to access new pages (products.aspx) in the old file structure, www.patternworks.com/pwshopping/products.aspx. How weird is that?!?!

After much searching, I found a fix. In the properties of the website in IIS, Home Directory Tab, then Configuration. On the first tab there is a list of Application Extensions. I edited the item for .aspx and checked "Verify that file exists". Restarted the website (just stop and start the site in IIS) and blamo it started working.

Hope this helped!!