N
Natan
I have an directory structure like this:
localhost/site/myapp
localhost/site/myapp/author/
localhost/site/myapp/revisor/
localhost/site/myapp/editor/
localhost/site/myapp/admin/
myapp is an application and is where my web.config is located. I must
create 4 completely separated areas for authors, revisors, and editor
and an admin. The 4 areas will be completely different, so i put each of
them in a different folder.
So, each of the 4 folders have a login form, the user authenticates and
can do his job. I am trying to use the Form Authentication that ASP.NET
provides, but i don`t want an user authenticated for "author" to have
access to "revisor" area... or an "editor" have access to "admin". there
are no privilegies, no admin will access author area. So each folder
will have it`s own authentication.
I tried this:
[localhost/site/myapp/web.config]
<configuration>
<location path="author">
<authentication mode="Forms">
<forms name="AUTHOR_AUTH" loginUrl="~/author/login.aspx" />
</authentication>
<authorization>
<deny users="?">
</authorization>
</location>
<location path="revisor">
<authentication mode="Forms">
<forms name="REVISOR_AUTH" loginUrl="~/revisor/login.aspx" />
</authentication>
<authorization>
<deny users="?">
</authorization>
</location>
<and etc="... =)"/>
</configuration>
but it`s not redirecting to the login page.. i can enter any folder
always. I don`t know if my web.config is wrong, or Windows
Authentication comes first to authorize...
anyone can help?
thanks...
localhost/site/myapp
localhost/site/myapp/author/
localhost/site/myapp/revisor/
localhost/site/myapp/editor/
localhost/site/myapp/admin/
myapp is an application and is where my web.config is located. I must
create 4 completely separated areas for authors, revisors, and editor
and an admin. The 4 areas will be completely different, so i put each of
them in a different folder.
So, each of the 4 folders have a login form, the user authenticates and
can do his job. I am trying to use the Form Authentication that ASP.NET
provides, but i don`t want an user authenticated for "author" to have
access to "revisor" area... or an "editor" have access to "admin". there
are no privilegies, no admin will access author area. So each folder
will have it`s own authentication.
I tried this:
[localhost/site/myapp/web.config]
<configuration>
<location path="author">
<authentication mode="Forms">
<forms name="AUTHOR_AUTH" loginUrl="~/author/login.aspx" />
</authentication>
<authorization>
<deny users="?">
</authorization>
</location>
<location path="revisor">
<authentication mode="Forms">
<forms name="REVISOR_AUTH" loginUrl="~/revisor/login.aspx" />
</authentication>
<authorization>
<deny users="?">
</authorization>
</location>
<and etc="... =)"/>
</configuration>
but it`s not redirecting to the login page.. i can enter any folder
always. I don`t know if my web.config is wrong, or Windows
Authentication comes first to authorize...
anyone can help?
thanks...