Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Reading SharePoint User Information in ASP.NET

Reading SharePoint User Information in ASP.NET

Scheduled Pinned Locked Moved Web Development
csharpasp-netsharepointsysadminhelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A M SOMAN
    wrote on last edited by
    #1

    Hi, I have a problem with reading the user information sent by SharePoint Portal link. I have a SharePoint Server where we have designed a home page with links to in house applications. One of these links points to an ASP.NET web site application developed in ASP.NET 2003. I used the Navigation control present on the SharePoint Home Page (I believe this is an inbuilt webpart provided by SharePoint). On clicking of one menu item in this Navigation control, the ASP.NET web application opens in the same page below inside a web page webpart control. I want to display the logged in user;s ID with a message Welcome UserID on ASP.NET application's home page. This thing works for the very first time and shows the correct user name in the message. But when the user loggs into the SharePoint Portal with different UserID (by using "Sign in with different user link), then the changed UserID does not get reflected on the ASP.NET application's home page. It shows the old user id only. I am using folloing code to read the user id on home page. string strUser = this.Context.User.Identity.Name; lblUserName.Text="Welcome " + strUser; I also tried Request server collection variables like "LOGON_USER", "AUTH_USER", etc. but they didn't work. How to get the correct user information on ASP.NET application's home page so that it will reflect the changed user id on sharepoint? Thsnks in advance. Anil

    A 1 Reply Last reply
    0
    • A A M SOMAN

      Hi, I have a problem with reading the user information sent by SharePoint Portal link. I have a SharePoint Server where we have designed a home page with links to in house applications. One of these links points to an ASP.NET web site application developed in ASP.NET 2003. I used the Navigation control present on the SharePoint Home Page (I believe this is an inbuilt webpart provided by SharePoint). On clicking of one menu item in this Navigation control, the ASP.NET web application opens in the same page below inside a web page webpart control. I want to display the logged in user;s ID with a message Welcome UserID on ASP.NET application's home page. This thing works for the very first time and shows the correct user name in the message. But when the user loggs into the SharePoint Portal with different UserID (by using "Sign in with different user link), then the changed UserID does not get reflected on the ASP.NET application's home page. It shows the old user id only. I am using folloing code to read the user id on home page. string strUser = this.Context.User.Identity.Name; lblUserName.Text="Welcome " + strUser; I also tried Request server collection variables like "LOGON_USER", "AUTH_USER", etc. but they didn't work. How to get the correct user information on ASP.NET application's home page so that it will reflect the changed user id on sharepoint? Thsnks in advance. Anil

      A Offline
      A Offline
      A M SOMAN
      wrote on last edited by
      #2

      Additional information: Web application is installed on different server. SharePoint is on different server. When the user open the SharePoint Portal page first time, an authentication popup comes. Here the user enters usre id and the password to log in into the sharepoint. After that when the user clicks on my application's link, again the authentication popup comes as the application is on different server. But after changing the User from Sharepoint, no authentication popup is displayed for the application and the application shows the old user id only. this may help you to understand the scenario better. anil

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups