Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET place EXE on the network for multiuser access

Status
Not open for further replies.

N11689

Programmer
Jan 29, 2002
113
US
We are having the same exact issue as thread:

thread796-1198879

This thread, however, has been closed, so I need to begin again.

We previously used VB6 to deploy .exe files for runtime.
VB6 deployment pretty much just required copying the .exe to the network where it would be run from.

We are new to VB.Net and trying to rewrite our VB6 programs.

With VB.Net, we are getting security errors when we deploy the VB.Net .exe to our network.

I haven't been able to find anything clear-cut that states "These are the steps to deploy your VB.Net exe" AND deal with security. I have found help on creating a setup/deployment project and .msi file, however, they do not tell us how to set security.

Looking at this previous thread, it might be that we have to add the SQL Client to the application. Not sure how to do that with the .NET Framework 2.0 configuration tool. I get as far as the Permissions Set tab, but there I dont' see where to 'add'.

Please help. Thank you.
 
.Net has built in security to only run applications from "Trusted" locations. Anything on a local hard drive is "Trusted" by default. In order to trust a remote drive (a server share), you need to go into the control panel -> Administrative tools -> .Net Wizards -> Trust an Assembly. Then follow the instructions on that wizard. You will need to do this on every machine you deploy to.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
If you have too many machines to do the manual security configuration on each one, you can do a Launcher/Application type configuration. In this, a launcher application runs when the shortcut for the application is clicked. This launcher application checks the local exe for the "real" application against the exe at a network location. If the network exe is newer than the local exe, the launcher copies the newer exe from the network to the local machine, and then runs the exe. If the network exe is the same date/version, then no copying is done and the local exe is run. This is a little more complicated, but can work quite well if set up properly.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
I wrote a simple "Loader" program that runs on the local machine. As described in the previous post it checks the local copy of the program against the version on the network. I used a sequential number to post new exe's to the network folder as in MyApp-001.exe where 001 is incremented each time you post an update to the folder. The "Loader" program reads a local text file that contains application information and checks the network folder for new versions (002,003,etc.) and copies any new version to the local drive (without the -001) and executes it. The text file on the local machine contents are:

1st Line = Executable Name, 2nd Line = Version #, 3rd Line = Network Executables Folder
MyApp
045
G:\ExeUpdates\MyApp\

As you can see the first line is a description of what is in the text file. 2nd line is the application name, 3rd line is the version number that exists locally, 4th line is the network folder of where to look for updates. If the text file doesn't exist (first time loader is run), or it cannot find the network folder, I display a file dialog for the user to select the network folder and application. it then creates the text file as described above. With this setup you can use the loader program for many different apps. I am thinking about expanding this to include dll's. hope this helps.

Auguy
 
We have decided to use the caspol.exe to set permissions. This allowed us to set the runtime security policy, and we are able to run the .exe from the network.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top