1

I have an authorization error in my asp.net mvc4 application. My account admin of my machine is this one

admin

my session properties:

se

in my web.config file i put this snippet:

 <authentication mode="Windows" />
    <authorization>
      <allow  users = "Lamloumi" />
      <deny users="?"/>
    </authorization>

when i launch the application, i can't access to it.

What is the reason of this error? how can i fix my code?

Lamloumi Afif
  • 8,941
  • 26
  • 98
  • 191

2 Answers2

1

Try to use this:

<configuration>
<authentication mode="Windows" />
  <system.web>
    <authorization>
      <allow  users = "Lamloumi" />
      <deny users="?"/>
    </authorization>
  </system.web>
</configuration>
Majid
  • 13,853
  • 15
  • 77
  • 113
1

Try to add domain name to allow:

 <allow users="DomainName\UserName" />
Majid
  • 13,853
  • 15
  • 77
  • 113