1

There are 1 best solutions below

1
Divyesh Mistry On

Step 1 : Add below code in Page_Load() of default.aspx page

String WindowsUserName;
System.Security.Principal.IPrincipal User;
User = System.Web.HttpContext.Current.User;
WindowsUserName = User.Identity.Name;
Char[] Spliter = { '\\' };
String[] user = new string[2];
user = WindowsUserName.Split(Spliter);
//WindowsUserName = user[1]; //" + WindowsUserName;
InitParams += ",WindowsUserName=" + WindowsUserName;//",WindowsUserName=ram";

Step 2 : Add below code in Application_Startup() of App.xaml page in silverlight application

string msWindowsUserName = e.InitParams["WindowsUserName"];