Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

How to get name of sharepoint user

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dsen.25@gmail.com - 16 Feb 2007 16:05 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.