Home Unable to deploy Razor Web Site to IIS 6
Reply: 0

Unable to deploy Razor Web Site to IIS 6

user5182 Published in September 19, 2018, 7:15 pm

I've been tearing my hairs out over this one. Found many similar references on StackOverflow and 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.
  • 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?

share|improve this question

2 Answers 2

active oldest votes
up vote 0 down vote
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.289683 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO