IIS7 Authentication Configuration for ASP.NET

I am trying to configure ASP.net MVC4 by hosting it using IIS7.

When I execute a get request to my API, I get the following error:

Description. An error occurred while processing the configuration file needed to service this request. Review the specific error information below and modify your configuration file accordingly.

Parser error message: An error occurred while using a partition that was registered as being allowDefinition='MachineToApplication'outside the application tier. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.

Source Error:

Line 27:   <system.web>
Line 28:     <compilation debug="true" targetFramework="4.0" />
Line 29:     <authentication mode="None" />
Line 30:     <pages>
Line 31:       <namespaces>

Source file: C: \ inetpub \ wwwroot \ api \ web.config Line: 29

Line 29 is highlighted in red. Any help would be greatly appreciated.

Joe

+5
1

(web.config) IIS7, , machine.config. IIS7.

http://technet.microsoft.com/en-us/library/cc733010(v=ws.10).aspx

MORE: IIS Express "authentication" web.config, IIS.

​​ IIS Express, " ", applicationHost.config

MORE: http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

+5

All Articles