This is a repeat of a similar question which was never answered so I wanted to give it a fresh start. In fact it looks like some SPDoctor closed it with very odd comments.
Anyway; I have a web part that does nothing other than retrieves the current user and formats a nice welcome message.
string currentWeb = "", fullName = "";
try
{
fullName = SPContext.Current.Web.CurrentUser.Name.ToString();
currentWeb = SPContext.Current.Web.Title.ToString();
}
catch
{
fullName = "Guest";
currentWeb = "St. Joseph";
}
ltfullName.Text = "<h2>" + fullName + ",</h2>";
ltsiteName.Text = "<h3>" + currentWeb + "</h3>";
I too am having intermittent users report that it is not their name but some other user.
We are thinking that either this is some type of Netscaler / load balancer setting causing this or some type of bug in the MS API?