Hi
I am trying to get the logged in user name: If I use
"System.Environment.UserName" in my C#.net code I get the person's id
who logged into the machine. I want to get the name of the SharePoint
User.
>From the Form Library an infopath form is filled. People get to the
form library with a specified UserId password, it does not have to be
the same as the machine logged in UserID. So when I try to use
"System.Security.Principal.WindowsIdentity.GetCurrent().Name" hoping
it will
give me the sharepoint user - I get the System Access Denied. I
actually got
the same for the System.Environment.UserName - and as soon as i added
the
site to Local Intranet zone - it worked. But for the
System.Security.Principal.WindowsIdentity.GetCurrent().Name I still
get the
error. I have few lines of code on the "OnLoad" event.
How can I make this code fully trusted? Can I just make the code fully
trusted and
not the form? If I do so will it solve this issue?
Thanks
Senthil Kumar D
Kalyan Reddy - 19 Feb 2007 05:18 GMT
Hello
Please try reading this link below
http://infopathdev.com/howto/tutorials/default.aspx?i=06d94826ac7a46a09a0f68238c
2e0769
Hope it helps you

Signature
Kalyan Reddy
Visit
http://www.qdabra.com/
> Hi
>
[quoted text clipped - 23 lines]
>
> Senthil Kumar D