davidrobin Posted November 27, 2003 Posted November 27, 2003 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. Quote
Administrators PlausiblyDamp Posted November 27, 2003 Administrators Posted November 27, 2003 (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 June 5, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Mehyar Posted November 27, 2003 Posted November 27, 2003 Try System.Environment.UserName I am not sure if it works on the network though... Quote Dream as if you'll live forever, live as if you'll die today
davidrobin Posted November 27, 2003 Author Posted November 27, 2003 So am i going to have to change the security on every machine that uses my app? That sounds like a big job. 800+ staff. Quote
mocella Posted November 28, 2003 Posted November 28, 2003 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. Quote
bonetech Posted December 4, 2003 Posted December 4, 2003 You dont have to go on every computer for that. Go to the server... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.