I have a site that requires Windows Authentication the application obtains the credential from the Security.Prinicipal once the user is autenticated the problem is that my credentials on my local environment are different that the ones stored in the DB and the user preferences cannot be obtain. i am doing the following workaround in order to deal with this issue.
#if DEBUG
var myUser = userBL.GetSingle(@"desiredDomain\otherUserName");
#else
var myUser = userBL.GetSingle(HttpApplication.User.Identity.Name);
#endif
Session.Add("User",myUser);
is there any other way rather than impersonating or the above mentioned workaorund to change the the value of HttpApplication.User.Identity.Name this is beacuse I have to change my code everytime I need to commit into repository or deploy the App