Saturday, March 31, 2012

Web.config file

Hi,

I have an application that I want to setup for each folder a web.config file
with different authentication, but when I try to do that it gives me an
error saying that maybe that folder is not configured in IIS as virtual
directory.

In the root I don't want to have redirect to login page if i try to access
any file in the root.
If I want to access to any FOLDER present in application root I want to
redirect to the Login page with authentication Forms type.

I already try to put one we.config file in each folder but the error
described above occurs.
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
rucanormally there is only 1 web.config (root level)
in there you can have
<authentication mode="Forms">
<forms loginUrl="Secure/Login.aspx" />
</authentication>
i know it is possible to have this securing different folders in different
ways (probably w the authorization) but i do it myself, as my user and
security system is a part of my application. When you log in your user is
stored in the session and dependant on the rights, and location info
associated w that user you get or don't get sertain stuff.

in other words i only use the web.config to make sure a user logs in
(instaid of going to a url direct)

hope it helps

eric

"ruca" <ruuca@.iol.pt> wrote in message
news:eehJXL4KEHA.2456@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have an application that I want to setup for each folder a web.config
file
> with different authentication, but when I try to do that it gives me an
> error saying that maybe that folder is not configured in IIS as virtual
> directory.
> In the root I don't want to have redirect to login page if i try to access
> any file in the root.
> If I want to access to any FOLDER present in application root I want to
> redirect to the Login page with authentication Forms type.
> I already try to put one we.config file in each folder but the error
> described above occurs.
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
You can use a <location> element to set up different authentication for each
folder.

"ruca" <ruuca@.iol.pt> wrote in message
news:eehJXL4KEHA.2456@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I have an application that I want to setup for each folder a web.config
file
> with different authentication, but when I try to do that it gives me an
> error saying that maybe that folder is not configured in IIS as virtual
> directory.
> In the root I don't want to have redirect to login page if i try to access
> any file in the root.
> If I want to access to any FOLDER present in application root I want to
> redirect to the Login page with authentication Forms type.
> I already try to put one we.config file in each folder but the error
> described above occurs.
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
Still hapens the same error when I have this:

<location path="pss">
<system.web>
<customErrors mode="Off" />
<authentication mode="Forms">
<forms name="LoginPss" loginUrl="qsqLogin.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Rick Spiewak" <rickspiewak@.mindspring.com> escreveu na mensagem
news:ONkI8E5KEHA.624@.TK2MSFTNGP11.phx.gbl...
> You can use a <location> element to set up different authentication for
each
> folder.
> "ruca" <ruuca@.iol.pt> wrote in message
> news:eehJXL4KEHA.2456@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I have an application that I want to setup for each folder a web.config
> file
> > with different authentication, but when I try to do that it gives me an
> > error saying that maybe that folder is not configured in IIS as virtual
> > directory.
> > In the root I don't want to have redirect to login page if i try to
access
> > any file in the root.
> > If I want to access to any FOLDER present in application root I want to
> > redirect to the Login page with authentication Forms type.
> > I already try to put one we.config file in each folder but the error
> > described above occurs.
> > --
> > Programming ASP.NET with VB.NET
> > Thank's (if you try to help me)
> > Hope this help you (if I try to help you)
> > ruca
Sorry but are child web.config files removed ?

Patrice

"ruca" <ruuca@.iol.pt> a crit dans le message de
news:uGbMGk5KEHA.3628@.TK2MSFTNGP12.phx.gbl...
> Still hapens the same error when I have this:
> <location path="pss">
> <system.web>
> <customErrors mode="Off" />
> <authentication mode="Forms">
> <forms name="LoginPss" loginUrl="qsqLogin.aspx" />
> </authentication>
> <authorization>
> <deny users="?" />
> </authorization>
> </system.web>
> </location>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
> "Rick Spiewak" <rickspiewak@.mindspring.com> escreveu na mensagem
> news:ONkI8E5KEHA.624@.TK2MSFTNGP11.phx.gbl...
> > You can use a <location> element to set up different authentication for
> each
> > folder.
> > "ruca" <ruuca@.iol.pt> wrote in message
> > news:eehJXL4KEHA.2456@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > > I have an application that I want to setup for each folder a
web.config
> > file
> > > with different authentication, but when I try to do that it gives me
an
> > > error saying that maybe that folder is not configured in IIS as
virtual
> > > directory.
> > > > In the root I don't want to have redirect to login page if i try to
> access
> > > any file in the root.
> > > If I want to access to any FOLDER present in application root I want
to
> > > redirect to the Login page with authentication Forms type.
> > > > I already try to put one we.config file in each folder but the error
> > > described above occurs.
> > > --
> > > Programming ASP.NET with VB.NET
> > > Thank's (if you try to help me)
> > > Hope this help you (if I try to help you)
> > > ruca
> >
What child files? I only have this one Web.config file.

--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Patrice" <nobody@.nowhere.com> escreveu na mensagem
news:%23Zr$So5KEHA.268@.TK2MSFTNGP10.phx.gbl...
> Sorry but are child web.config files removed ?
> Patrice
> "ruca" <ruuca@.iol.pt> a crit dans le message de
> news:uGbMGk5KEHA.3628@.TK2MSFTNGP12.phx.gbl...
> > Still hapens the same error when I have this:
> > <location path="pss">
> > <system.web>
> > <customErrors mode="Off" />
> > <authentication mode="Forms">
> > <forms name="LoginPss" loginUrl="qsqLogin.aspx" />
> > </authentication>
> > <authorization>
> > <deny users="?" />
> > </authorization>
> > </system.web>
> > </location>
> > --
> > Programming ASP.NET with VB.NET
> > Thank's (if you try to help me)
> > Hope this help you (if I try to help you)
> > ruca
> > "Rick Spiewak" <rickspiewak@.mindspring.com> escreveu na mensagem
> > news:ONkI8E5KEHA.624@.TK2MSFTNGP11.phx.gbl...
> > > You can use a <location> element to set up different authentication
for
> > each
> > > folder.
> > > > "ruca" <ruuca@.iol.pt> wrote in message
> > > news:eehJXL4KEHA.2456@.TK2MSFTNGP12.phx.gbl...
> > > > Hi,
> > > > > > I have an application that I want to setup for each folder a
> web.config
> > > file
> > > > with different authentication, but when I try to do that it gives me
> an
> > > > error saying that maybe that folder is not configured in IIS as
> virtual
> > > > directory.
> > > > > > In the root I don't want to have redirect to login page if i try to
> > access
> > > > any file in the root.
> > > > If I want to access to any FOLDER present in application root I want
> to
> > > > redirect to the Login page with authentication Forms type.
> > > > > > I already try to put one we.config file in each folder but the error
> > > > described above occurs.
> > > > --
> > > > Programming ASP.NET with VB.NET
> > > > Thank's (if you try to help me)
> > > > Hope this help you (if I try to help you)
> > > > ruca
> > > > > >

0 comments:

Post a Comment