Results 1 to 6 of 6

Thread: Mixed authentication with roles

Threaded View

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width