I have seen that there already a number questions like this out there, however after trying all of the solutions thus far none of them have worked for me such as;
I am building an ASP.Net Forms Application based on Windows Authentication. With the code below I am always getting a return value of false for IsAuthenticated.
If User.Identity.IsAuthenticated Then If User.IsInRole("role") Then End If Else Response.Redirect("NotAuth.aspx") End If
my Web.Config file is set like this for the authentication
<authentication mode="Windows"> <forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/" /> </authentication>
When having done it this way in the past I've never encountered an issue, but this time I cannot figure it out.
Any and all help greatly received.