Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running .net application over a network

I need to enable a .NET application to run over a network share, the problem is that this will be on clients' network shares and so the path will not be identical.

I've had a quick look at ClickOnce and the publish options in Visual Studio 2008 but it needs a specific network share location - and I'm assuming this location is stored somewhere when it does its thing.

At the moment the job is being done with an old VB6 application and so gets around all these security issues, but that application is poorly written and almost impossible to maintain so it really needs to go.

Is it possible for the domain controller to be set up to allow this specific .NET application to execute? Any other options would be welcomed as I want to get this little application is very business critical.

I ought to say that the client networks are schools, and thus are often quite locked down as are the client machines, so manually adding exceptions to each client machine is a big no no.


Apologies, I forgot to mention we're restricted to .NET 2.0 for the moment, we are planning to upgrade this to 4.0 but that won't happen immediately.

like image 790
Marlon Avatar asked Jul 15 '26 16:07

Marlon


2 Answers

  1. On the "Publish" tab of your project properties there is a "Installation Folder Url" textbox. Visual Studio requires you to put something there. Just put in any random UNC path (\\someserver\randomfolder)
  2. Click the "Options" button. Select "Manifests" and check "Exclude deployment provider URL". This will remove the path you were forced to add in step 1.

This should allow clients to put your deployment wherever they want. When their users install, their start menu shortcut will point back to where they put the deployment.

Here's the description from MSDN about that checkbox...

Exclude deployment provider URL
Specifies whether to exclude the deployment provider URL from the deployment manifest. Starting in Visual Studio 2008 SP1, the deployment provider URL can be excluded from the manifest for scenarios in which application updates should come from a location unknown at the time of the initial publication. After the application is published, updates will be checked from wherever the application is installed from.

like image 196
codeConcussion Avatar answered Jul 18 '26 06:07

codeConcussion


The deployment location in the manifest must match the location where it is deployed. You are going to HAVE to use a UNC path. There shouldn't be any problem with this. ClickOnce applications install under the user's profile, and require no administrative privileges. It only needs read access to the file share where the application is deployed.

The best answer is to create deployments for each school and for you to set the UNC path, because then you can just send them a signed deployment and they can put it on the file share. But that's a major p.i.t.a. if there are a lot of schools involved.

The next answer is: Who actually deploys the application to each school, i.e. puts it on the file share? Is there some kind of administrator?

What I would recommend (depending on who it is) is giving them mageUI.exe and teaching them how to change the deployment URL and re-sign the manifest (it will prompt). The problem with them re-signing the deployment is they have to have a certificate. You could give each school their own certificate (created with the "create test certificate" button in VS, or use MakeCert to create one [ask if you want more info]) or give them all the same key (not very secure, but hey, it would work).

If you at least updated to .NET 3.5 SP-1, you could deploy the application without signing it. (I'm not giving you a hard time about .NET 2.0, my company is in the same position, I'm just passing this information on.)

If the computers have internet access, you could probably find somewhere to host the deployment for $10/month, and push it to a webserver and let them all install from there. Then everyone would get updates at the same time, you would only have to deploy updates to one location. This would be the simpliest solution, assuming they have internet access.

like image 45
RobinDotNet Avatar answered Jul 18 '26 06:07

RobinDotNet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!