3
Answers

Queries on ASP.NET Authentication as its not working

Sachin R

Sachin R

9y
476
1

Please help me with the queries below...

Note- Enabled both windows and anonymous authentication in IIS and impersonation is set to false also but still not working(not able to get the app run in anonymous auth/app pool identity)
 
Using .NET 4.5 CLassic app pool and identity is same for the pool 
 
OP

===

@System.Security.Principal.WindowsIdentity.GetCurrent().Name

Siraj\MScount -------------------> why my windows account/pc name is coming here instead IISUSR /app pool identity

@User.Identity.IsAuthenticated

False

@User.Identity.Name -------------------->why no name displayed here

@User.Identity.AuthenticationType

Config file:

=======

<!--<authentication mode="None">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>-->
<authorization>
<!--<deny users="?" />-->
<!--<allow users="*"/>-->
</authorization>
<identity impersonate="true" />

Answers (3)