Click here to Skip to main content
15,909,445 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionLogin Control page redirect to login.aspx Pin
Sarfaraj Ahmed9-Sep-08 23:11
Sarfaraj Ahmed9-Sep-08 23:11 
AnswerRe: Login Control page redirect to login.aspx Pin
AhsanS9-Sep-08 23:18
AhsanS9-Sep-08 23:18 
GeneralRe: Login Control page redirect to login.aspx Pin
Sarfaraj Ahmed9-Sep-08 23:37
Sarfaraj Ahmed9-Sep-08 23:37 
QuestionValidation Problem Pin
krishnaveer9-Sep-08 23:11
krishnaveer9-Sep-08 23:11 
AnswerRe: Validation Problem Pin
AhsanS9-Sep-08 23:17
AhsanS9-Sep-08 23:17 
GeneralRe: Validation Problem Pin
krishnaveer10-Sep-08 0:17
krishnaveer10-Sep-08 0:17 
Questioni want to upload/download files from SSH server using SFTP (any .Net Component for free)..... Pin
Shaik Haneef9-Sep-08 23:00
Shaik Haneef9-Sep-08 23:00 
QuestionWeb app with multiple MembershipProvider / RoleProvider Pin
J4amieC9-Sep-08 22:34
J4amieC9-Sep-08 22:34 
I am writing a rather complex web application which has 2 distinct stores of "Users" who must be able to access said app. Think of these users as either Internal and External. Essentially at the moment they are stored in 2 different Sql2005 db's.

I have implemented 6 classes, inheriting from the relevalnt classes in System.Web.Security namespace

InternalMembershipUser
InternalMembershipprovider
InternalRoleProvider
ExternalMembershipUser
ExternalMembershipprovider
ExternalRoleProvider


They do they're job perfectly. I initially had just one configured in my web.config, using FormsAuthentication and everything worked hunky dorey. Now I can configure the second one in my web.config, and have 2 separate login forms (in fact the built in asp:Login control lets you specify the membership provider to use). So now both types of user can log in.

My problem arises when I try to use a call to HttpContext.Current.User.IsInRole(string). This always uses the default RoleProvider so if you've logged in as an ExternalUser its using the InternalRoleProvider (default) rather than ExternalRoleProvider. This does make sense as there appears no way to associate a membership provider to a RoleProvider. Im hoping im wrong there but I dont think there is.

So my question is does anyone have any idea how I can force a RolePrincipal (which is what IPrincipal you get with FormsAuthentication) to use a specified RoleProvider?

thx
AnswerRe: Web app with multiple MembershipProvider / RoleProvider Pin
leppie10-Sep-08 2:14
leppie10-Sep-08 2:14 
GeneralRe: Web app with multiple MembershipProvider / RoleProvider Pin
J4amieC10-Sep-08 3:09
J4amieC10-Sep-08 3:09 
AnswerRe: Web app with multiple MembershipProvider / RoleProvider Pin
Pete O'Hanlon10-Sep-08 2:17
mvePete O'Hanlon10-Sep-08 2:17 
GeneralRe: Web app with multiple MembershipProvider / RoleProvider Pin
J4amieC10-Sep-08 3:12
J4amieC10-Sep-08 3:12 
GeneralRe: Web app with multiple MembershipProvider / RoleProvider Pin
Pete O'Hanlon10-Sep-08 3:53
mvePete O'Hanlon10-Sep-08 3:53 
GeneralRe: Web app with multiple MembershipProvider / RoleProvider Pin
Pete O'Hanlon10-Sep-08 8:27
mvePete O'Hanlon10-Sep-08 8:27 
QuestionError in calculating irr in asp.net and vb.net Pin
devlop9-Sep-08 22:32
devlop9-Sep-08 22:32 
QuestionHow to convert audio/video files to swf? Pin
wajans9-Sep-08 22:08
wajans9-Sep-08 22:08 
AnswerRe: How to convert audio/video files to swf? Pin
AhsanS9-Sep-08 22:59
AhsanS9-Sep-08 22:59 
Questionhow to get all employee ids into array? Pin
shankarcbe9-Sep-08 21:44
shankarcbe9-Sep-08 21:44 
AnswerRe: how to get all employee ids into array? Pin
Gamzun10-Sep-08 0:17
Gamzun10-Sep-08 0:17 
QuestionDicom viewer in dot net Pin
Khawar Abbas19-Sep-08 21:42
Khawar Abbas19-Sep-08 21:42 
Questionupload and download file Pin
niki_nilu9-Sep-08 21:09
niki_nilu9-Sep-08 21:09 
AnswerRe: upload and download file Pin
N a v a n e e t h9-Sep-08 21:11
N a v a n e e t h9-Sep-08 21:11 
GeneralRe: upload and download file Pin
niki_nilu9-Sep-08 21:33
niki_nilu9-Sep-08 21:33 
GeneralRe: upload and download file Pin
AhsanS9-Sep-08 21:37
AhsanS9-Sep-08 21:37 
GeneralRe: upload and download file Pin
N a v a n e e t h9-Sep-08 21:39
N a v a n e e t h9-Sep-08 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.