Results 1 to 6 of 6

Thread: Mixed authentication with roles

  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.

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5

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

    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

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width