L
luna
in vb its system.environment.username - whats the equivalent in aspx with
code behind (VB) ??
cheers
mark
code behind (VB) ??
cheers
mark
Kristof Van Praet said:It depends how you would like to use it.
If you want to get the Windows username you have to make sure you disabled
anonymous access in IIS.
If you use forms authentication you can make a custom principal:
System.Security.Principal.GenericIdentity identity = new
System.Security.Principal.GenericIdentity("testUserName");
System.Security.Principal.GenericPrincipal principal = new
System.Security.Principal.GenericPrincipal(identity,new string[]{
"TestRole"});
Context.User = principal;
Hope this helps,
Kristof
luna said:thanks but niether seems to work - aspx accepts it but it does nothing!
thanks
mark