Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

ok right i'm writing an intranet page for my company.

The idea of the page is basically to let a user to select items off a list and thenthen send the order to an e-mail address.

 

the problem i'm having is simple, i need to get the network logon name of the user.

at the moment i'm using the following code.

       Dim uname As String
       Dim myDetails As System.Security.Principal.WindowsIdentity = GetCurrent()
       If Not myDetails.IsAnonymous Then
           uname = myDetails.Name
       End If

when I run this code, it gives me "NT AUTHORITY\NETWORK SERVICE" as the username instead of DKA2, my actual username. how do i get this to show my actual username

Posted

thanks, i solved my problems in the end. it turns out that the solution involved putting

<identity impersonate="true"/>

into web.config.

it seems my problems were arrising from the fact that web.config is case sensitive :(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...