Re: Bypass forms authentication
From: Colin Basterfield (colinbasterfield_at_hotmail.com)
Date: 03/24/04
- Next message: Colin Basterfield: "Default page + logon page"
- Previous message: Williams, James: "I want asp.net to act as a different user than the one that is currently logged on IS THIS POSSIBLE!!!"
- In reply to: Arvind P Rangan: "Re: Bypass forms authentication"
- Next in thread: Ravichandran J.V.: "Re: Bypass forms authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 24 Mar 2004 12:15:56 +1200
Hi Arvind,
Sorry I forgot to thank you for this post, I only just saw it actually. I
will give this a go.
I have a new post for the group, on a similar line.
Cheers
Colin
"Arvind P Rangan" <arvind99@hotmail.com> wrote in message
news:ekmlY5aBEHA.3184@TK2MSFTNGP09.phx.gbl...
> Colin,
> First if u want new user to just go in with that button make the button
> causevalidation = false.
> and under web.config.
> add a new section before closing of web.config.
> <location path="newuserpage.aspx">
> <system.web>
> <compilation defaultLanguage="vb/c#" debug="true" />
> <authorization>
> <allow users="*"/>
> </authorization>
> </system.web>
> </location>
>
> This is working fine for me.
> Arvind.
> "Colin Basterfield" <colinbasterfield@hotmail.com> wrote in message
> news:ewEp2KOBEHA.2404@TK2MSFTNGP11.phx.gbl...
> > Hi Chris,
> >
> > Did you get around this problem, because I have a similar thing. I have
a
> > Login page, which does the Forms Authentication, set up in the
web.config,
> > and has the Deny thing going on, so that all works. Now however I want
to
> > add a button on the login page which allows New Users to be entered on
the
> > system via a New Users page, but of course it loops round and round,
> between
> > the two pages, and because there are RequiredFieldValidators on the New
> > Users page it fails.
> >
> > So wondered if you had got around it?
> >
> > Many thanks
> > Colin
> >
> > "CJF" <chrisf@unr.edu> wrote in message
> > news:e6pU9xvAEHA.220@TK2MSFTNGP09.phx.gbl...
> > > Hi Arvind,
> > > I tried using the location element and it still loops between
pages.
> > I
> > > placed the location block in my project's web.config and when that
> didn't
> > > work, I put it in my subfolder's web.config. I also tried specifying
a
> > > specific file. I'm wondering if it's the ordering of events that
still
> > > causing it, since I'm doing the db connect on the prerequest event. I
> > don't
> > > know at what stage the web.config file is interpreted.
> > > I'll have to find some other way to work around that.
> > >
> > > "Arvind P Rangan" <arvind99@hotmail.com> wrote in message
> > > news:egmluOpAEHA.712@tk2msftngp13.phx.gbl...
> > > > Hi Chris,
> > > > Add this after the first </sytem>
> > > > before </configuration>
> > > > <location path="FOLDERNAME">
> > > > <system.web>
> > > > <compilation defaultLanguage="vb/c#" debug="true" />
> > > > <authorization>
> > > > <allow users="*"/>
> > > > </authorization>
> > > > </system.web>
> > > > </location>
> > > > Check it out This Works.
> > > > Arvind
> > > > "CJF" <chrisf@unr.edu> wrote in message
> > > > news:up$W7phAEHA.1796@TK2MSFTNGP12.phx.gbl...
> > > > > My application uses forms-based authentication.
> > > > > In my .NET project I have a subfolder to store forms that display
> > > > > user-friendly error messages to the user.
> > > > > I also have an http module to handle prerequests for creating my
> > > database
> > > > > objects and connections. If the database connection fails I want
> the
> > > user
> > > > > to be redirected to one of my error pages. The problem is if the
> > > > connection
> > > > > fails before the user has an opportunity to authenticate then the
> user
> > > > gets
> > > > > redirect to the error page, which in turn redirects them to the
> > sign-in
> > > > > page, which in turn fails to connect to the db and redirects them
to
> > the
> > > > > error page (and round and round we go!). I created a web.config
> file
> > > for
> > > > my
> > > > > subfolder and set the authorization to allow all users, but it's
not
> > > > > allowing the user to see the error page and still invokes forms
> > > > > authentication by using the authentication and authorization
> settings
> > in
> > > > the
> > > > > parent web.config file. If I go to the error page by typing in
the
> > URL
> > > > > directly it works, but it doesn't work if I redirect in the code.
> > > > >
> > > > > How can I allow redirection to a page in the project and bypass
the
> > > > > authentication on a subfolder or form basis? Should the child
> > > web.config
> > > > > file override the parent and allow all users if I choose?
> > > > >
> > > > > Thx, Chris
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Colin Basterfield: "Default page + logon page"
- Previous message: Williams, James: "I want asp.net to act as a different user than the one that is currently logged on IS THIS POSSIBLE!!!"
- In reply to: Arvind P Rangan: "Re: Bypass forms authentication"
- Next in thread: Ravichandran J.V.: "Re: Bypass forms authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]