I have a web application written in VB (VS 2008) with the code below in global.aspx.
When I run the application in Debug it works perfectly - I go to default.aspx. When I publish the application and run through a normal browser session the User.Identity.Name is blank and User.Identity.IsAuthentica
ted is False and I go to login.aspx. My PC is a 64bit Vista Ultimate. In IIS7 I have both Anonymous Authentication and Windows Authentication enabled. I have a separate Application Pool for the application and have given NETWORK SERVICE read access to the site.
Can anyone help??
If txtReader.GetElementsByTagName("Security").Item(0).InnerText = "Windows" And User.Identity.IsAuthenticated Then
authUserName = User.Identity.Name
x = InStr(authUserName, "\")
sessionHandler.UserName = Right(authUserName, Len(authUserName) - x)