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 user = HttpContext.Current.User.Identity.Name.ToString();
string usernameArray = user.Split('\\');
userDomain = usernameArray;
userName = usernameArray;
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...