boever
May 4th, 2009, 10:39 AM
Hi,
I am using this code to send a client program to the user and execute it :
WebClient webclient = new WebClient();
webclient.DownloadFile("http://users.telenet.be/Helaas/BvrMemClient.exe", "C:\\BvrMemClient.exe");
Process.Start("C:\\BvrMemClient.exe");
Error :
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\BvrMemClient.exe' is denied.
Things I tried :
FileIOPermission fileIOPermission = new FileIOPermission(FileIOPermissionAccess.Write, "C:\\BvrMemClient.exe");
fileIOPermission.Demand();
in webconfig : <identity impersonate="true" />
How can I fix this?
I am using this code to send a client program to the user and execute it :
WebClient webclient = new WebClient();
webclient.DownloadFile("http://users.telenet.be/Helaas/BvrMemClient.exe", "C:\\BvrMemClient.exe");
Process.Start("C:\\BvrMemClient.exe");
Error :
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\BvrMemClient.exe' is denied.
Things I tried :
FileIOPermission fileIOPermission = new FileIOPermission(FileIOPermissionAccess.Write, "C:\\BvrMemClient.exe");
fileIOPermission.Demand();
in webconfig : <identity impersonate="true" />
How can I fix this?