Code Snipets

Get Sharepoint Current Logged in UserName in ASP.NET web application Page View Webpart

Posted in ASP.NET, Sharepoint by mauliksoni on August 23, 2010

Get Sharepoint Current Logged in UserName in ASP.NET web application displayed in PageView Web Part -

HttpContext.Current.User.Identity.Name;

Note: Make sure in IIS your web application has ASP.NET Impersonation
and Windows Authentication Turned On. All all other option turned off.
Take a look at screen shot.

Screenshot – IIS Settings

IIS Settings - Authentication

IIS Settings - Authentication

IIS Settings - Options

IIS Settings - Options

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.