Hi everyone,
Bare with me I am new at ASP.NET. I created this form and config file, to use forms authentication I get this error:
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 2: <system.web>
Line 3: <customErrors mode="Off"/>
Line 4: <authentication mode="Forms">
Line 5: <forms name="AuthCookie"
Line 6: path="/"
My code on the other hand looks like this in the web.config file,
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name="AuthCookie"
path="/"
loginUrl="login.aspx"
protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
Not sure what is going on here, any help would be appreciated,
Thanks,
Ross
Bare with me I am new at ASP.NET. I created this form and config file, to use forms authentication I get this error:
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 2: <system.web>
Line 3: <customErrors mode="Off"/>
Line 4: <authentication mode="Forms">
Line 5: <forms name="AuthCookie"
Line 6: path="/"
My code on the other hand looks like this in the web.config file,
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name="AuthCookie"
path="/"
loginUrl="login.aspx"
protection="All"
timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
Not sure what is going on here, any help would be appreciated,
Thanks,
Ross