In MVC2 I have used Page.User.Identity.Name using the <%@ Control Language=\"C#\" Inherits=\"System.Web.Mvc.ViewUserControl\" %>
Page.User.Identity.Name
<%@ Control Language=\"C#\" Inherits=\"System.Web.Mvc.ViewUserControl\" %>
How
I had the same problem. I used this tutorial to solve this issue.
In short, in your view, put this code:
@Context.User.Identity.Name
Just make sure that the project is set to authenticate with windows.