Web Config forms authentication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tma

    Web Config forms authentication

    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.a spx"><system.we b><authorizatio n><allow
    users="*"/></authorization></system.web></location>

    <location path="regdataen try.aspx"><syst em.web><authori zation><allow
    roles="Administ rator"/><deny
    users="?"/></authorization></system.web></location>


    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.a spx"
    it still loads.

    Dim MyIdentity As New GenericIdentity ("MyIdentity ")

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

    Dim MyPrincipal As New GenericPrincipa l(MyIdentity, MyStringArray)

    Thread.CurrentP rincipal = MyPrincipalI'm



    Any help is greatly appreciated.






Working...