Windows Authentication Problems

P

Pirooz Javan

All,

I have successfully set my authentication to Windows and in Visual
studio properties set the deployment to a virtual directory on a
Windows 2k3 Box (eg. http://localhost/authApp). The code that returns
the users name is below:

WindowsPrincipal winPrincipal =
(WindowsPrincipal)HttpContext.Current.User;
lblUser.Text = winPrincipal.Identity.Name.ToString();

When I publish this to an actual virtual IIS server (http://TestApp),
the same code does not work. Even though Integrated windows
authentication is turned on and it is using the same web.config file
and Application Pool, the display is blank. Here is some more info:

1) I have made sure http://TestApp is in the local intranet sites
2) The same settings are used in IIS properties for the virtual IIS
server as it is being used int he virtual directory
3) Anonymous access is disabled
4) App Pool is set to Network Service

Any help would be appreciated...

PJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top