Link to home
Start Free TrialLog in
Avatar of suresh_bansal
suresh_bansalFlag for India

asked on

Making VB.NET as full trust application to be run from network shared folder

We developed business application using Oracle 10g as the database and VB.Net as front end. Application has One exe and approx 100 dll files for various forms which are called by reflection and loaded at run time.

1.  Server is Windows 2003 server which has Framework and Crsyatl reports .net runtime installed. It also has Oracle 10g database server. We created shared folder say kcpl at windows 2003 server and placed exe file and all dll files in that folder.

2..Framework and Crystal reports .net runtime are instralled at the Server and each Node

Problem
 When we copy the software .i.e  exe file and all indiividual form dll files onto local machine (each node) , they work properly.  But we try to create a short cut from the shared folder  kcpl  from the windows server , we get public security permission error. We used to run the application properly in VB6 platform by creating shortcut from the shared folder in server.  

If we need to copy all the software files (exe as well as dll files) in every node, it is not workable as the changes are done to dll files very frequently. Even Click Once deployment is also not workable.

Kindly guide as to who we make this fully trusted application and run from the shared folder of server itself. We wish to run the application in LAN environment as well as in Internet environment.

Regards

Suresh Bansal

Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

You should change the .NET code-trust settings to trust the location.  FullTrust is not normally given to code running on the Intranet Zone, which is where your code is.

See http://johnnynine.com/blog/RunningANetApplicationFromANetworkShare.aspx
Avatar of suresh_bansal

ASKER

Reply to SteveH UK

First of all my oppologies for replying late. The solution look to work but somehow we were unable to do it as it is quite cumbersome.

We tried to configure the Framework 2.0 Security Policy where we deployed the application. We created the New Group -> and set various parameters as desired.

After that the application again gave the puplic security permissions problems. We have following few querries in this regard

1. We are surprised as to whether we need to that kind of setting at each node separately where that application needs to work. If this is the case, the excercise is not worth it.

2. We have not understood as to why Microsoft has made this running the application from Network shared folder much complicated which was absolutely simple in VB6.

3 We were not able to find this Framework configration tool under Setting ->Control Panel ->Adm Tools on a machine which has only Fraemwork installed. This is found properly on the machine which has complete Visual Studio 2005 installed. Further it is not practical to configure Framework Tool on each machine separate.

4. Complete application consists of one exe file and approx 1000 dll files for individual forms, do we need to put some extra code in each project also.  Which again is going to be cumbersome task.

5. How software developers over the world are deploying frequently customisable .net applications as to whether they make
  a) Click once deployment type  OR
   b) make their onw logic to copy the changed exe /dll files into the local node folder and then run the application.

Waiting for your comments


Suresh Bansal















ASKER CERTIFIED SOLUTION
Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You have explained the reasons nicely why Microsoft did this.  With this I am reaching to this conclusion that by .NET Code itself we need to  copy exe file as well as all dll files as and when changed to a folder at each  local  machine and then run the exe from local machine itself.

This way it should work fine with the only hitch that  hundreds of dll files will keep getting copied onto each local machine which should have been avoided by incorporating  some  
code in the common exe file.  Framework 2.0 confirgration can be made one Network Computer where complete accplication is hosted but it  just cannot be made on all the computers where this aplication will be run which may be in the LAN environment or in the  
Internet environment.

We ourself were interested to follow the local copy concept  of exe file as well dll files when the application is invoked from the internet based machine. But we were interested to run it from the Network shared folder without creating of local copy in each machine. With your explantaions when we don't want get into botheration of setting Framework 2.0 confirration at each node separately , creating a local copy of all exe and dll files should be better.


I fully appreciate your replies and highly appreciate your understanding of the .NET internals. Kindly inform wheter my thought as understood above is correct or not.


Suresh Bansal
In reply to: (not sure "accept answer" comments are generally visible)
----------------------------------------------------

You have explained the reasons nicely why Microsoft did this. With this I am reaching to this conclusion that by .NET Code itself we need to copy exe file as well as all dll files as and when changed to a folder at each local machine and then run the exe from local machine itself.

This way it should work fine with the only hitch that hundreds of dll files will keep getting copied onto each local machine which should have been avoided by incorporating some
code in the common exe file. Framework 2.0 confirgration can be made one Network Computer where complete accplication is hosted but it just cannot be made on all the computers where this aplication will be run which may be in the LAN environment or in the
Internet environment.

We ourself were interested to follow the local copy concept of exe file as well dll files when the application is invoked from the internet based machine. But we were interested to run it from the Network shared folder without creating of local copy in each machine. With your explantaions when we don't want get into botheration of setting Framework 2.0 confirration at each node separately , creating a local copy of all exe and dll files should be better.


I fully appreciate your replies and highly appreciate your understanding of the .NET internals. Kindly inform wheter my thought as understood above is correct or not.

---------------------------------------  

If you really need to be updating the DLLs individually, then what you suggest is a fine solution.  However, you may want to review ClickOnce again as it can check for updated DLLs each time the application is started.

You might also want to consider using a package such as InstallShield, so that you can deploy the application rapidly using MSI installation techniques, such as Group Policy Software Deployment.

What you have stated is absolutely fine, but I do recommend you consider wider issues.  The installers generally make things easier, and your current plan doesn't allow for more difficult deployments such as registry settings, shortcuts, COM components and Windows services.
Reply to SteveH UK

Thanks sir for your confirmation of my understandig. Presently we have decided to follow the click once deployment methodoloty but this copies only those  dll  files which have been directly included as reference in the main exe files. It does not copy those dll files which are called by reflection.

For those dll files (called by reflection) we may be following different technique to copy locally.

Reagrds

Suresh  Bansal
You can add additional files into a click-once deployment by adding them directly into the project and setting the properties.  However, it sounds like you are updating the DLLs separately, not part of the click-once.  Is that correct?  If so, the installation is harder because you cannot combine them into the click-once easily.