Well, to be honest, problem is why 'currentUser.Identity.Name' is blank. Options are:
`<authentication mode="Windows">
</authentication>
<identity impersonate ="false"/>`
And IIS 7 Integrated Windows Authentication is enabled, 'Anonymous access’ disabled. (It was mantioned here) App is executing on local computer, in the same domain. When I'm trying to write:
<authorization>
<allow users="MY_USER_NAME"/>
<deny users="?"/>
</authorization>
I get page 401.2, access forbidden.
And now, i think, options are inhereted from somwhere, and 'Anonymous access’ is still enabled. So, how i need to check the actual value in code.
UPDATE Role manager is this:
<roleManager defaultProvider="DefaultRoleProvider" enabled="true">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</roleManager>