Authentication in Web.Config

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top