Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm not sure if this is a deployment issue of actual progrmming issue.

 

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.

  • Administrators
Posted (edited)

Applications running from a network drive have a restricted security policy. You can change this through the configuration tools under your administrative tools.

Search these forums and you'll probably find more information on this.

Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Wouldn't Code Access Security (CAS) file designed by your network admins (or .Net admins) to control application permissions work for this? If they define some security levels to assign permission levels, then create some strong name key files to relate to these levels, they could digitally sign different assemblies before deployment. Once they've send the CAS file out to all the clients (SMS job), each signed assembly will pick up the appropriate permissions.

 

From what I understand, this is what MS does in-house, and we're exploring this option for a smart-client deployment in the future.

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...