Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HttpContext.Current.User.Identity.Name works only within IIS broswer

Status
Not open for further replies.

shaileng

Programmer
May 15, 2003
10
US
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
 
>>if I try to launch the site on same machine but outside IIS it does not recognises the logged in used

did the URL change when you launched the same from IIS? another thing, the authentication is called when launched outside IIS???

Known is handfull, Unknown is worldfull
 
Yes I I tried accessing with the changed URL still it has same problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top