How can I open my exe from another PC?

Dec 16 2006 4:39 AM
Hi,
I made a dotnet project, but I want to put the exe file in a server and make a shortcuts for it in several clients. even I setup the dotnet frame work in the cilent I can't run it.
So I hope to tell me how to do so?
thanks.

Answers (5)

0
John George Messiha

John George Messiha

  • 0
  • 209
  • 29k
Dec 28 2006 1:23 PM

Many thanks.
it works well in my lan but in another one (in my work) I must make caspol -s off, even I use:

PermissionSet ps = new PermissionSet(PermissionState.Unrestricted ) ;

ps.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess ,Application.StartupPath+"\\" ) );

ps.AddPermission(new EnvironmentPermission(EnvironmentPermissionAccess.AllAccess,Application.StartupPath ));

ps.AddPermission(new ZoneIdentityPermission(SecurityZone.Intranet));

ps.AddPermission (new SqlClientPermission(PermissionState.Unrestricted) );

ps.AddPermission(new SecurityPermission(PermissionState.Unrestricted ));

ps.AddPermission (new UIPermission (PermissionState.Unrestricted));

ps.Assert() ;

can I change it from my code?
thanks.

0
Scott Lysle

Scott Lysle

  • 0
  • 25.7k
  • 18.7m
Dec 26 2006 11:26 PM
In 2003, you still have the Assembly.LoadFrom call available which works like:

System.Reflection.Assembly asy;
string asyPath = @"\\serv\fold\someassy.dll";
asy = System.Reflection.Assembly.LoadFrom(asyPath);

Which downloads the specified assembly to the GAC and executes it; you'd likely have to alter the security policy on the targeted machines which may be more of a bother than installing an executable directly on the targeted machines.  This being because the level of trust may not be sufficient to support whatever it is that your application does when it executes.

You could try the above to see if it works in your environment and then look into the security issues if you encounter a problem.
0
John George Messiha

John George Messiha

  • 0
  • 209
  • 29k
Dec 26 2006 12:51 PM
Hi,
 I read that article, but I couldn't find a solution to my problem,
as if I use the .NET Configuration 1.1 I should do that to each client and each project.
I think the solution could be in the System.Security.Permissions name space but I don't know what is the code I should write and where I can do?
so please help me.
note I use VS.Net 2003.
thanks.
0
John George Messiha

John George Messiha

  • 0
  • 209
  • 29k
Dec 18 2006 4:14 PM
thanks,
I'll see this link.
0
Scott Lysle

Scott Lysle

  • 0
  • 25.7k
  • 18.7m
Dec 17 2006 1:51 AM