|
-
Dec 13th, 2011, 11:07 AM
#1
Thread Starter
Frenzied Member
Mixed authentication with roles
I have the requirement for internal users to acces our web app without loggin in manually so using windows authentication, external users need to be refered to a form based authentication.
Now I have implemented the solution below as described below
http://mvolo.com/blogs/serverside/ar...ntication.aspx
However I also need to employ roles for authorization. The forms side is all set up but I cannot seem to get it to work for the windows side of things has anyone implemented a mixed mode involving roles?
I tried adding in an extra provider
<providers>
<add name="SqlRoleManager" type="System.Web.Security.SqlRoleProvider" connectionStringName="aspnetdbConnection_dev" applicationName="Corp.Web.GSP"/>
but I have no idea how to configure it for usse only by the windows users. Secondly if I set it as the default where i have code like
if (Roles.IsUserInRole("Internal") || Roles.IsUserInRole("SysAdmin") || Roles.IsUserInRole("Sales"))
{
I get an
Method is only supported if the user name parameter matches the user name in the current Windows Identity
error
<add name="WindowsRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
Last edited by FishGuy; Dec 13th, 2011 at 11:16 AM.
-
Dec 13th, 2011, 05:25 PM
#2
Re: Mixed authentication with roles
Check out this thread - we started discussing mixed mode membership providers - not something I actually got working - but seemed that was the way to address this
http://www.vbforums.com/showthread.p...ght=membership
-
Dec 14th, 2011, 02:47 AM
#3
Re: Mixed authentication with roles
I remember reading that thread with some interest at the time! 
Did you end up doing something else instead?
Gary
-
Dec 14th, 2011, 06:17 AM
#4
Re: Mixed authentication with roles
Never got that working - maybe we did something like change timeout parameters for that customer so they didn't have to re-login so often when inside the network.
We are a fully jQuery / webservice shop now. I am actually about to make a webservice for another customer of mine that uses ldap to authenticate.
-
Dec 15th, 2011, 04:02 AM
#5
Thread Starter
Frenzied Member
Re: Mixed authentication with roles
Just to keep you upto date, im currently trying to implement the solution as someoneelse did below.
Few teething problems though, as it seems every file tries to authenticate and redirects to the login i.e. menu controls images css files etc http://stackoverflow.com/questions/7...n-with-asp-net
-
Dec 17th, 2011, 10:48 AM
#6
Re: Mixed authentication with roles
Hello,
Will be interested to hear how you get on with this! Can you keep us posted?
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|