views:

751

answers:

4

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?

+6  A: 

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

GWLlosa
Heh.. you win! :D
Randolpho
Your link may be a better one, though.http://stackoverflow.com/questions/504585/c-application-over-a-network/504602#504602
GWLlosa
Nice solution. A few of the users have very limited permissions to install on there computers ill have to look into what kind of workarounds they may need.
Ioxp
This seams to be the most recommended application for deployment. Thanks!
Ioxp
+1  A: 

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

Randolpho
+2  A: 

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.

DannySmurf
I disagree with this solution, but I'm not gonna downmod you for it. ClickOnce is the best way to handle deployment scenarios of this sort, IMO.
Randolpho
Normally I'd agree (that was my first thought as well), but we're not necessarily talking about something that needs to be deployed. Also, there could be technical reasons (or policies) in the way of setting up a web server for this.
DannySmurf
Good point on both.
Randolpho
@DannySmurf: Very good point as i said above there are limited permissions hence the way we have done it for now. So far i accept both answers.
Ioxp
+3  A: 

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.

Orion Edwards
Good point about the full trust, but it seems like this is running from inside some sort of trusted network where (presumably) malicious software isn't going to be posted.
DannySmurf
yeah, it's more about if the app needs to be designed to work in a partial trust environment, or similar, then granting FullTrust will bypass that kind of check
Orion Edwards