N
Narendra
Hi All:
I am trying to create a web application where there are two
directories. One directory named Templates which will serve the pages
to Users and other directory called Admin which will have web forms
for online content management. I am trying to use forms
authentication. It works pretty well.
But, now I want the above kind of authorization for the "Templates"
directory pages(which will be served based on comparison from a
database table) and a different kind of authorization for the "Admin"
folder in the same web project.
Here is my web.config which works presently. Can anybody help me
modify for the above scenario.
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPNETAUTH" protection="All"
path="/" timeout="20">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<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" / </system.web>
<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Templates/Registration.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
I am trying to create a web application where there are two
directories. One directory named Templates which will serve the pages
to Users and other directory called Admin which will have web forms
for online content management. I am trying to use forms
authentication. It works pretty well.
But, now I want the above kind of authorization for the "Templates"
directory pages(which will be served based on comparison from a
database table) and a different kind of authorization for the "Admin"
folder in the same web project.
Here is my web.config which works presently. Can anybody help me
modify for the above scenario.
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPNETAUTH" protection="All"
path="/" timeout="20">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<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" / </system.web>
<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Templates/Registration.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>