In VB6 we used the GetUserName API call to get the id of the user logged in to the network.

The application lives on a network drive.

When I converted the application in VS.net 2003 and ran it I got a security error. Saying something about security permissions do not allow the action to take place.

When I moved the application to the local C drive the error did not appear.

The equivalent to GetUserName in .net is System.Security.Principal.WindowsIdentity.GetCurrent.Name. When I added this to a project I started getting different errors.

How can I have an application on a network drive and read the user id.
Is this going to be a big issue involving the IT dept.

Any help would be appreciated.