John Timney (MVP) wrote:
you could probably run process.start against the mstsc.exe program (remote
connection manager) to shell an instance of Remote Conenction Manager to
create your connection using a .rdp file as your command line argument.
Cool, thanks alot thats exactly what I needed.
Having tried this however a problem has emerged;
When i run the application from a networked location i get a
SecurityException :(
What can i do about this?
Thanks!
Andrew
Below is the top of the stack trace
System.Security.SecurityException: Request failed.
at
System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at
System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Object
assemblyOrString, PermissionSet granted, PermissionSet refused,
RuntimeMethodHandle rmh, SecurityAction action, Object demand,
IPermission permThatFailed)
at
System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet
grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction
action, Boolean throwException)
at
System.Security.CodeAccessSecurityEngine.CheckSetH elper(CompressedStack
cs, PermissionSet grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at Form1.menuItemClicked_RDC(Object sender, EventArgs e)
The action that failed was: LinkDemand
The type of the first permission that failed was:
System.Security.PermissionSet
The Zone of the assembly that failed was: Intranet