title: asp.net web forms get sharepoint username
body: <p>so i've built a web application in asp.net and c#. That web application will be shown in a sharepoint webpage through i a iframe or something, thats not up to me. What i need to finish the project is a way of getting the sharepoint logged in username.</p>
  
  <p>someone there told me it was simple and could be done with this code:</p>
  
  <pre><code>using Microsoft.SharePoint;
  
  SPContext.Current.Web.CurrentUser.LoginName
  </code></pre>
  
  <p>however i get these errors:</p>
  
  <p>"The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"</p>
  
  <p>"The name 'SPContext' does not exist in the current context."</p>
  
  <p>do you guys have any idea of how to solve this or know any other way to do this?</p>