Configuring ASP.Net 3.5 applications for IIS 7 on Vista

Ok, it is complicated... There are some issues. So I am logging everything that I can as I do it.

1st Error: "configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". "

This issue can be resolved only if you have Administrative Access on your machine. Go to %windir%\system32\inetsrv\config\applicationHost.config Edit. if it says you do not have have permissions to open it, click start -> Inetmgr -> go to the directory in which you want to give permissions. Right Click -> Edit Permissions -> Security Tab -> Advanced Edit Users(<your userid>\Users) and give full access. I don't quite know how this works, but it did work for me. after that, Edit the applicationhost.config search for <section name="handlers" overrideModeDefault="Deny" /> and update it to <section name="handlers" overrideModeDefault="Allow" />

Save the document and that error will go away. The next error that I encountered is:

2nd Error: "The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed."

Now I am wondering, if IIS doesn't understand .aspx, there is something majorly wrong. First thing I do is go to control panel -> Uninstall a program -> Turn Windows Features on and off. I open the Internet Information Server branch -> World Wide Web Service Branch -> Application Development Features, this is what I see...

image

I change it into this:

image

That should take care of the handlers issue... now let's move on...

3rd 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: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

 Line 45:             ASP.NET to identify an incoming user. Line 46:         -->Line 47:      <authentication mode="Windows"/>Line 48:       <!--Line 49:             The <customErrors> section enables configuration 

Source File: D:\Projects\POC\MAD\web.config    Line: 47

So I go to to IIS Manager, right click on the application and convert to application. Do a quick F5 on my browser... and voila...!!! It works...!!!

image