Server Error in ”

asp.netiis

I'm following a tutorial that says:

1 – The first step before adding ASP NET Identity is to disable the default authentication mechanism of the application server (IIS) because the framework uses its own. To do this, add the following configuration in the "system.web" section of the Web.config file:

 <authentication mode="None" />

So, my web.config now looks like this:

<system.web>
    <authentication mode="None" />
    <compilation>
      <assemblies>
        <add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
</system.web>

but when I try to run the application, I get the error:

Server Error in '/' Application.

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: 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 35:

Line 36: < system.web >

Line 37: < authentication mode="None" / >

Line 38: < compilation >

Line 39: < assemblies >

I tried to search for answers, but I found nothing. Specially considering that, as this computer is not mine, I can't do anything that requires admin permissions, so, I can't follow this guide to configure a virtual directory as IIS application .

Best Answer

Try the following steps:

  • Open IIS Manager
  • Expand the tree: Sites >> Default Web Site
  • Right click on your site and choose Convert to Application >> OK