问题
I have a .NET 3.5 application that I wish to install on the client's server and have workstations run it directly from the network share. I've read a bit that seems to suggest this isn't as easy as simply copying the application to the network share like I would for a native exe. Unfortunately, there seems to be a lack of documentation on the correct/best way to do this (via ClickOnce or otherwise).
So, how would I go about this type of deployment? Do I just copy the assemblies? Is there something with ClickOnce that can make my life easier and facilitate future updates? (Bear in mind, each client will have a different install point on their local server.)
What I know so far:
Obviously, the .NET framework has to be installed on each workstation; I'm thinking that installing it via a Group Policy is the way to go here.
I've also read a bit about running from a network share requiring full trust, but then I read this may not be an issue in 3.5. Does anyone know the definitive answer here?
回答1:
Starting with 3.5 SP1 it is no longer an issue to run applications from a network share. They will run with full trust by default.
Vance's Post: http://blogs.msdn.com/vancem/archive/2008/08/13/net-framework-3-5-sp1-allows-managed-code-to-be-launched-from-a-network-share.aspx
I believe the actual change is in CLR 2.0 SP2 which you get with 3.5 SP1 but I haven't found any concrete documentation on the subject.
回答2:
You can also use ClickOnce deployment to allow normal restricted users to install the app locally. This deployment still allows you to publish updates to your network share and have users automatically grab them. And it will work if you're stuck with a .Net version prior to 3.5sp1.
It also side steps some other issues. For example, if you need to deploy an update and a user currently has the app running on their local machine the file system may have locked a file you need to change. ClickOnce skips that.
来源:https://stackoverflow.com/questions/587358/net-deployment-to-network-share