Web Config forms authentication

Discussion in 'ASP .Net' started by tma, Aug 11, 2004.

  1. tma

    tma Guest

    I'm attempting to do Forms authentication in my web.config but I'm having a
    bit of difficulty. My web config looks like the following:

    <location path="newuser.aspx"><system.web><authorization><allow

    <location path="regdataentry.aspx"><system.web><authorization><allow

    My code is the following for testing purposes. My symtom right now is that
    even though the "User" role is not authorized for form "regdataentry.aspx"
    it still loads.

    Dim MyIdentity As New GenericIdentity("MyIdentity")

    Dim MyStringArray As String() = {"User"}

    Dim MyPrincipal As New GenericPrincipal(MyIdentity, MyStringArray)

    Thread.CurrentPrincipal = MyPrincipalI'm

    Any help is greatly appreciated.
    tma, Aug 11, 2004
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page