7

I have installed .NET Framework 3.5 SP1 and ASP.NET MVC CTP in a Windows Server 2003 R2 box, but my ASP.NET MVC site still doesn't work on that server. I was searching the internet and IIS for a solution and I noted that I can't choose other .NET Framework version besides 2.0 for my virtual directories. I'm almost sure if I correct this I can make my site work there.

Currently the main "/" URL answers with:

Directory Listing Denied
This Virtual Directory does not allow contents to be listed.

And the "/Default.aspx" URL answers with:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Section or group name 'system.web.extensions' is already defined. 
Jader Dias
  • 88,211
  • 155
  • 421
  • 625

5 Answers5

11

Phil Haack has a pretty good writeup here

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Jason
  • 86,222
  • 15
  • 131
  • 146
3

I had the similar issue.

  1. I recently upgraded my server to support .net framework 4.0.
  2. Converted my application to support .net fx 4.0.
  3. Deployed the application on sever and trying to test .. I get "HTTP Error 404 - File or directory not found"

Solution

  1. Open IIS Manager, expand the master server node (i.e, the Servername node), and then select the Web service extensions node.
  2. In the right pane of IIS Manager, right-click the extension "ASP.NET v4.0.*".
  3. Click the Allow button.
Dhanaji
  • 41
  • 3
2

Besides Jason's answer, the common things to look for is:

  • Enable Wildcard mapping and point it to the aspnet assembly Phil mentions in Jason's link.

The /default.aspx error you are getting seems to be a web.config configuration error. At the very top of your web.config, look for:

<sectionGroup name="system.web.extensions" 

Most likely it is defined twice. You only need the reference for the RC build you have. If you need the exact RC references, create a new ASP.NET MVC Web Project in a temp folder. And then grab the web.config from it.

-E

eduncan911
  • 17,165
  • 13
  • 68
  • 104
  • I have not found where it is defined elsewhere, but I had to remove from my Web.Config this section, and then it worked. But Jason's tip also helped me. – Jader Dias Mar 11 '09 at 13:32
1

I also encountered this problem, in my case the solution was to uninstall the ASP.NET MVC Beta.

The application I was trying to get working had the version 1 MVC dlls bin deployed and once the Beta was uninstalled it all worked fine.

Alan Heywood
  • 154
  • 2
  • 10
0

Similar issue: We tried to install an MVC4/.NET 4 app on an IIS6 box, set up everything as described, and got same error:

Directory Listing Denied
This Virtual Directory does not allow contents to be listed.

For us, the final fix was to add the UrlRoutingModule to the web.config:

  <add name="UrlRoutingModule"
       type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

Which makes sense, but I don't know why we needed to explicitly add it and others didn't. (We are running in a directory under Sharepoint, maybe related...)

Scott Stafford
  • 43,764
  • 28
  • 129
  • 177