Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web.config and location...

Reply
Thread Tools

web.config and location...

 
 
Natan
Guest
Posts: n/a
 
      04-15-2004
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...
 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      04-15-2004
you can only have one auth method per site/vd.
You will have to create each with its own virtual dir if you want it to have
it's own auth
Otherwise, have them login at the top level, and control auth based on
groups,id's,etc

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Natan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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...



 
Reply With Quote
 
 
 
 
Natan
Guest
Posts: n/a
 
      04-15-2004
Curt_C [MVP] wrote:
> you can only have one auth method per site/vd.
> You will have to create each with its own virtual dir if you want it to have
> it's own auth
> Otherwise, have them login at the top level, and control auth based on
> groups,id's,etc


what prevents an app from having multiple logins, if you have the
"location" tag to specify different configs for different directories
and the cookie path can be changed?

And how do i disable windows authentication in my app?
 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      04-15-2004
web.config wont allow it, it's part of the asp.net framework I believe. ONE
auth type per "site/vd". You can override/exclude/include but you can't set
multiple types

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Natan" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Curt_C [MVP] wrote:
> > you can only have one auth method per site/vd.
> > You will have to create each with its own virtual dir if you want it to

have
> > it's own auth
> > Otherwise, have them login at the top level, and control auth based on
> > groups,id's,etc

>
> what prevents an app from having multiple logins, if you have the
> "location" tag to specify different configs for different directories
> and the cookie path can be changed?
>
> And how do i disable windows authentication in my app?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments