Ask a Question related to ASP.NET Security, Design and Development.
-
Ray.Net #1
Re: forms auth and roles
You probably already found your answer, but I'll post an answer for
anyone else stumbling across this thread. Sorry, you'll have to
perform any VB.Net-to-C# conversions. Place the following code in the
Page_Load of your login form:
If Context.User.Identity.Name.Length > 0 And Not IsPostBack Then
Response.Redirect("AuthFailed/AuthFailed.aspx")
End If
Of course the AuthFailed.aspx form needs to be in some location with
few or no role restrictions, since users end up there because they
lack role membership. That's why I put it in a separate folder, where
the Web.config authorization section has only <allow users="*" />
Good luck,
Ray
"Matt Brown" <mlbrown7@hotmail.com> wrote in message news:<#UxP4XiUDHA.1196@TK2MSFTNGP10.phx.gbl>...> I am using FormsAuthentication and roles loaded from a database.
> ...when the user tries to
> access a page that they do not have the role for, they are just sent
> back to the logon page. I would like to show a permission denied error
> - but, can't find a way to trap for this.Ray.Net Guest
-
Forms Auth Info passed to Windows Auth?
The requirement is to build an ASP.Net intranet application, so external users can log in to the main web portal via forms authentication, using... -
ASP.NET 2.0 - Windows Auth and Roles
Is it possible to use Windows authentication and the builtin role provider in ASP.NET 2 Beta 2? The intranet app I'm developing uses Windows... -
FORMS AUTH HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I'm using forms Auth! Why am i getting the error:-I HAVE DONE EVRYTHING NEEDED! Error authenticating. Error obtaining group names. The specified... -
Roles based Forms Auth - denied pages redirect
I would like to know how, if at all possible, a custom redirect page can be setup for when a users role(s) are denied to a page. The default... -
Configuring Windows Auth & Forms Auth in Asp.Net
Configuring Windows Auth & Forms Auth in Asp.Ne Hi, I've configured a web app to use windows authentication and also set up two separate...



Reply With Quote

