Random Developer
Random Developer

Reputation: 1344

C# Application over a Network

I have run into a few cases where i have been asked to deploy an application (C#, .Net 2.0) to a server and users need to test the application over the network. I have found the following that works with out any hitches other than a warning telling you "hey your running this over a network are you sure you want to do this?":

%systemroot%\Microsoft.NET\Framework\v2.0.50727\caspol -m -cg 1.2 -url \\<Path> FullTrust

Is there a better way of centralizing the application than the above?

Upvotes: 3

Views: 3149

Answers (4)

Orion Edwards
Orion Edwards

Reputation: 123642

The problem with granting FullTrust, is that it really really means full trust. If your app has any sort of identity/security control, the granting fulltrust will bypass all of that.

I guess otherwise, you're "exposing" your machine to files running from that other one, so they could potentially do damage, however this is no worse than any other native win32 executable running on a remote machine, so it's no big deal IMHO.

I'd recommend the best solution is to simply install the app on your user's machines. You could use something like ClickOnce to make this painless and easy for them.

Upvotes: 4

TheSmurf
TheSmurf

Reputation: 15568

Best solution would probably be to sign your assemblies, and push out a full-trust policy to all of the client machines for those assemblies. Then, just run them from the network share via the UNC path as if they were local.

Upvotes: 2

Randolpho
Randolpho

Reputation: 56391

You might look into ClickOnce deployment. Usually a much better way to deploy than running on a share.

Upvotes: 1

GWLlosa
GWLlosa

Reputation: 24403

Try using ClickOnce deployment. We use it for all of our network-deployed applications.

Upvotes: 6

Related Questions