Link to home
Start Free TrialLog in
Avatar of jshantz4
jshantz4

asked on

Wrong Domain Appearing in LOGON_USER

This is probably a really easy fix, but I can't seem to find it.

We have a web server setup at work.  I've set it to use Integrated Windows authentication, and disabled all the rest (i.e. Anonymous, Basic, and Digest).

To test the authentication, I wrote a basic ASP.NET application that just says:

Response.Write("You are authenticated as: " + Context.User.Identity.Name);

The problem is, I'm authenticated on COMPANYDOMAIN.  But the web application is outputting:

"You are authenticated as WEBSERVERNAME\jshantz"

What am I doing wrong?  I don't want to enable Basic or Digest (which allow you to specify a default domain), so how I can I get the server to authenticate based on COMPANYDOMAIN accounts, and not WEBSERVERNAME accounts?  The weird thing is that it doesn't ask me for a username/password or anything, so it's obviously accepting my existing network credentials (from being authenticated already with COMPANYDOMAIN), but still it prints WEBSERVERNAME as the domain.  
Avatar of muzzy2003
muzzy2003

Have you tried using HttpContext? I think you should be using this not Context. Don't know if it'll sort the problem out as well, but try it first and then let us know if it makes a difference, then we can move on from there.
Avatar of jshantz4

ASKER

Page.Context is of type HttpContext, but I tested your suggestion anyhow: same deal.  Thanks for the reply.
Sorry - of course, it's Page.Context not the Context class directly. Need more caffeine ...

Just as a matter of interest, is there a local machine user account named jshantz as well as the domain one?
There is, but I've tried authenticating on my network with a user that is not created locally on the web server, and it just gives me an authentication popup, but does not allow me to authenticate.

What's strange is that if I enable Basic Authentication, and click the Edit button to select a default domain, if I click on Browse and view the entire network *I don't even see my COMPANYDOMAIN* listed.  It's on the network, I can certainly access the web server, but for some reason, the web server won't recognize COMPANYDOMAIN.  So that throws another bit of confusion into the loop.

Any ideas would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of muzzy2003
muzzy2003

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, are your passwords in synch between the COMPANYDOMAIN\jshantz and WEBSERVER\jshantz accounts?
Avatar of meverest
You might like to try posting this question also in the ASP and .NET topic areas.

cheers.
The problem turned out to be that the web server wasn't a member of the domain.  I had previously thought that it was, but it turns out I was incorrect.