Hi Peter,
I'm tracking your support to Billy. I have the same structure Billy
has, and I tryed your sugestion shown below in this message, with no
success.
My folder structure is
d:\conseg (unsecure) <-- only this one is configured as application
in IIS
d:\conseg\consegseguro (secure) <-- this one isn't
Do I need have both folder and sub-folder registered in IIS as
application? Can you figure out if I'm doing some stupid?
My web.config is the following (some lines where put in the same row
for short):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- this is for the application root folder -->
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off"/> <!--mode="RemoteOnly"/-->
<authentication mode="Windows" />
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8"
/>
</system.web>
<!-- this is for the application secure sub-folder -->
<location path="consegseguro">
<system.web>
<authentication mode="Forms">
<forms loginUrl="logon.aspx" name="adAuthCookie" timeout="60">
<deny users="?"/>
<allow users="*"/>
</forms>
</authentication>
<identity impersonate="true"/>
</system.web>
</location>
</configuration>
I got this error
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 32: <system.web>
Line 33:
Line 34: <authentication mode="Forms">
Line 35: <forms loginUrl="logon.aspx" name="adAuthCookie"
timeout="60">
Line 36: <deny users="?"/>
Source File: D:\conseg\web.config Line: 34
I've tryed to use two separated web.config files, one for the unsecure
folder an another for the secure folder, but I got the same error.
Even configuring both folders as application in IIS. :>(
Thanks in advance
v-******@online.microsoft.com (Peter Huang [MSFT]) wrote in message news:<Fm**************@cpmsftngxa07.phx.gbl>...
Hi Billy,
Here is a sample web.config.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authentication mode="Forms" >
<forms loginUrl="Admin/Login.aspx" name="AdminLogin" protection="None"
path="/" timeout="20" >
</forms>
</authentication>
</system.web>
<location path="Admin">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
You may have a try and let me know if this works for you.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.