troubleshooting Question

web app on IIS 7 login error

Avatar of wiggy353
wiggy353 asked on
ASPMicrosoft IIS Web Server
9 Comments1 Solution487 ViewsLast Modified:
I have a web app that I made in Visual Studio 2010. It works fine when testing in visual studio. I have put it on an IIS 7 web server and am having problems. The error I am getting is:

Login failed for user 'MASTER\PIGSTEST$'.

The code that I have in the app to get the user is:

        protected void Page_Load(object sender, EventArgs e)
            string userName;
            string userDomain;
            string user = HttpContext.Current.User.Identity.Name.ToString();
            string[] usernameArray = user.Split('\\');
            userDomain = usernameArray[0];
            userName = usernameArray[1];

            lblPbmSiteMasterUserName.Text = userName.ToString();
            string versionInfo = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            lblBuildVersionPbmSite.Text = versionInfo;

The username that it is showing in the error isn't my user name when going to the page. The domain is correct, but the username is the name of the computer that is the webserver with a $ on the end. I'm not sure what's happening here...

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros