G
Grant Harmeyer
I've read similar posts to this issue, and I am fairly certain this
configuration should work. However, when I try to request any of the pages
in the Admin subdirectory of my application root, I am given the following
error:
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.
It then has the line "<authentication mode="Forms">" highlighted as the line
the error occurs at.
Is this an IIS config issue, or do I need to create a configSections node in
my web.config to facilitate this? If I need the configSections node added,
an example would be very helpful. Thanks.
<!-- Web.Config -->
<configuration>
<system.web>
<authorization>
<allow users="?" />
</authorization>
<compilation defaultLanguage="C#">
<assemblies>
<add assembly="MyAssembly" />
</assemblies>
</compilation>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<location path="Admin">
<system.web>
<authentication mode="Forms">
<forms name=".MYAPPAUTH" loginUrl="login.aspx"
protection="Encryption" timeout="20" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<httpRuntime executionTimeout="90" maxRequestLength="512"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
</system.web>
</location>
</configuration>
configuration should work. However, when I try to request any of the pages
in the Admin subdirectory of my application root, I am given the following
error:
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.
It then has the line "<authentication mode="Forms">" highlighted as the line
the error occurs at.
Is this an IIS config issue, or do I need to create a configSections node in
my web.config to facilitate this? If I need the configSections node added,
an example would be very helpful. Thanks.
<!-- Web.Config -->
<configuration>
<system.web>
<authorization>
<allow users="?" />
</authorization>
<compilation defaultLanguage="C#">
<assemblies>
<add assembly="MyAssembly" />
</assemblies>
</compilation>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
<location path="Admin">
<system.web>
<authentication mode="Forms">
<forms name=".MYAPPAUTH" loginUrl="login.aspx"
protection="Encryption" timeout="20" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<httpRuntime executionTimeout="90" maxRequestLength="512"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
</system.web>
</location>
</configuration>