Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Unable to deploy Razor Web Site (Web Pages project) to IIS 6

$
0
0

I've been tearing my hairs out over this one. Found many similar references on the internet, but nothing seems to help me.

I just keep on getting "Directory Listing Denied" when opening the website, and "This type of page is not served" when requesting a specific .cshtml file.

What I do is the following:

  • In Visual Studio 2010, I select File > New Web Site > ASP.NET Web Site (Razor)
  • Following http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx, I selected "Add Deployable Assemblies" and choose "ASP.NET Web Pages with Razor syntax".
  • I published the site to C:\inetpub\wwwroot\WebSite.
  • In IIS7 on my development machine (Windows 7), I converted the published folder to an application, and set the application pool to "ASP.NET v4.0".
  • Testing localhost/website, everything works fine.
  • Then I copied the whole folder to the remote machine, which runs Windows Server 2003 and IIS 6.
  • In IIS6, I created an application of the folder, and assigned a .NET 4 application pool.
  • I set the Wildcard Application Map of the folder to aspnet_isapi.dll with no verification.
  • When I open the website, I get a "Directory Listing Denied" error message.
  • When I try to open the Default.cshtml file, I get a "This type of page is not served".

It seems to me that all the required DLLs are included in the Bin folder (included by the "Add Deployable Assemblies" option):

  • Microsoft.Web.Infrastructure
  • NuGet.Core
  • System.Web.Helpers
  • System.Web.Razor
  • System.Web.WebPages
  • System.Web.WebPages.Administration
  • System.Web.WebPages.Deployment
  • System.Web.WebPages.Razor
  • WebMatrix.Data
  • WebMatrix.WebData

The .NET versions reported on the "This type of page is not served" error page are: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272.

What am I overlooking?

<div></div>


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>