I have a web site that is using windows authentication. 'Enable anonymous access' is unchecked. It works when I call it through Visual Studio but when I put the site on the server I get the following error:
Unable to cast object of type 'System.Security.Principal.GenericPrincipal' to type 'System.Web.Security.RolePrincipal'.
Here is the offending line:
System.Security.Principal.GenericPrincipal genericPrincipal = (System.Security.Principal.GenericPrincipal)HttpContext.Current.User;
System.Security.Principal.GenericPrincipal genericPrincipal = (System.Security.Principal.GenericPrincipal)HttpContext.Current.User;
web.config
<authentication mode="Windows"/>
<identity impersonate="true&quo ...
Go to the complete details ...