| | |
Roles.IsUserInRole() can't get it work !!!
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: May 2007
Posts: 8
Reputation:
Solved Threads: 0
Using ASP.NET Web Admin tool, i created 5 users and assigned them to different roles, but when i try to user Roles.IsUserInRole, it doesn't work, please take a look here:
ASP.NET Syntax (Toggle Plain Text)
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { string username = Login1.UserName; string password = Login1.Password; if (!IsPostBack) { if (Membership.ValidateUser(username, password)) { if (Roles.IsUserInRole("Saleman")) Response.Redirect("~/Saleman.aspx"); else if (Roles.IsUserInRole("Accountant")) Response.Redirect("~/Accountant.aspx"); else if (Roles.IsUserInRole("HR")) Response.Redirect("~/HR.aspx"); //Always receive Attempt to login failed message !! } } }
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: related to marquee & gridview
- Next Thread: Tag Prefix and Assembly error
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webservice wizard xml youareanotmemberofthedebuggerusers





