Is it possible to get the currently logged in user's username with Silverlight? You can assume that user has Windows OS and the Silverlight application is hosted in Internet Explorer. Getting the identity from server side with ASP.NET is not an option, this Silverlight application will be hosted on a static HTML file.
You can manage to get by this way.
1) Create asp.net web service application.
2) Implement web service and method to call from silverlight applicaton.
[WebMethod]
public string GetClientUserName()
{
return System.Web.HttpContext.Current.User.Identity.Name.ToString();
}
3) Deploy this web service application on web server. Don't allow anonymous user to access this.
4) Add this service to Silverlight application. (Add service reference)
5) Now, you can call this method and get user name from entire silverlight application.