Hi,
I have a problem using HttpContext.Current.User.Identity.Name while deploying ASP.Net 2.0 website on Windows 2003.
I have developed an application which uses HttpContext.Current.User.Identity.Name. This application runs fine on my machine however when I tried deploying it on windows 2003 IIS. Initially I had to fine tune couple of things like
- Create a application pool (since it complained that I had older version of .NET framework and suggested to create a application pool which I did)
- The custom error has to be set to "Off"
- Since I wanted to authenticate based on windows login (and hence using HttpContext.Current.User.Identity.Name) I set the web.config entry as authentication mode="Windows"
- on IIS folder properties--> Directory Security -> Authentication and access control -> Anonymous access disabled
So basically after this I could finally use my application however 1 weired thing i saw is the application (basically HttpContext.Current.User.Identity.Name that returns me the logged in user name) works fine when I launch the application from IIS browser however if I try to launch the site on same machine but outside IIS it does not recognises the logged in used (again basically HttpContext.Current.User.Identity.Name)
I need to fix this asap so pleas help
I have a problem using HttpContext.Current.User.Identity.Name while deploying ASP.Net 2.0 website on Windows 2003.
I have developed an application which uses HttpContext.Current.User.Identity.Name. This application runs fine on my machine however when I tried deploying it on windows 2003 IIS. Initially I had to fine tune couple of things like
- Create a application pool (since it complained that I had older version of .NET framework and suggested to create a application pool which I did)
- The custom error has to be set to "Off"
- Since I wanted to authenticate based on windows login (and hence using HttpContext.Current.User.Identity.Name) I set the web.config entry as authentication mode="Windows"
- on IIS folder properties--> Directory Security -> Authentication and access control -> Anonymous access disabled
So basically after this I could finally use my application however 1 weired thing i saw is the application (basically HttpContext.Current.User.Identity.Name that returns me the logged in user name) works fine when I launch the application from IIS browser however if I try to launch the site on same machine but outside IIS it does not recognises the logged in used (again basically HttpContext.Current.User.Identity.Name)
I need to fix this asap so pleas help