|
-
Jan 10th, 2006, 03:22 PM
#1
Thread Starter
Hyperactive Member
Use a VB.NET app. located on a server
Hi,
I want to install my VB.NET application on a server, so that 10-15 client PC will only have a shortcut on their desktop targeting the .exe file on the server.
I don't want to install the app on the 10-15 PC and run their own .exe. It's too complex when there is an update of the .exe I have to recopy the file to each station.
--
Anyone has a good URL explaining how to do that?
I guess I at least have to install the .NET framework on every PC. But for the rest, I need some help.
Right now, I can run my application directly on the server, but when I call the .exe from another client-pc, it doesn't work.
Thanks for helping.
-
Jan 10th, 2006, 03:27 PM
#2
Re: Use a VB.NET app. located on a server
Did you place the framework on the workstation? As long as it points to the right location of the files on the server, I'd think it should work. What error are you getting?
-
Jan 10th, 2006, 03:28 PM
#3
Re: Use a VB.NET app. located on a server
I had problems with this at a customer site also - something about the .EXE's credentials?
Is that the error you are getting?
-
Jan 10th, 2006, 03:36 PM
#4
Re: Use a VB.NET app. located on a server
you need to do 2 things (well 3)
1) .NET framework MUST be installed on each client workstation...
2) You need to setup permissions for the .NET framework on the client workstations to have full trust for your network app. By default network shares do NOT have full trust, and therefor will probably cause problems when running. In administrative tools (in control panel) you will find the "Microsoft .NET Framework 1.1 Wizards" In there you can give your app on the server the full trust it needs. You can automate this process if you have the network setup where your network admin can push out permissions as part of the users security policy.
3) this one may not be needed, but if you used any COM references you need to make sure those COM DLLs are installed properly on the client workstation.
My guess is #2 is what is causing your problem.
-
Jan 10th, 2006, 03:40 PM
#5
Re: Use a VB.NET app. located on a server
 Originally Posted by kleinma
2) You need to setup permissions for the .NET framework on the client workstations to have full trust for your network app. By default network shares do NOT have full trust, and therefor will probably cause problems when running. In administrative tools (in control panel) you will find the "Microsoft .NET Framework 1.1 Wizards" In there you can give your app on the server the full trust it needs. You can automate this process if you have the network setup where your network admin can push out permissions as part of the users security policy.
Do you do that on the SERVER just once? Can you do it from the client PC and affect the SHARE FOLDER?
-
Jan 10th, 2006, 03:41 PM
#6
Re: Use a VB.NET app. located on a server
it needs to be done from the client on each workstation...since what it is doing is modifying the security settings for the framework that exists on the local client machine...
-
Jan 10th, 2006, 03:44 PM
#7
Re: Use a VB.NET app. located on a server
 Originally Posted by kleinma
it needs to be done from the client on each workstation...since what it is doing is modifying the security settings for the framework that exists on the local client machine...
Ok - I guess that makes sense since you said it could be pushed out as part of the users security
We have a customer that has a lot of thin clients and an application server - does it get done just once from the APPLICATION SERVER - or from each logon from the application server?
-
Jan 10th, 2006, 03:50 PM
#8
Re: Use a VB.NET app. located on a server
I am not sure if MS provides any methods for making it easy to admin .net apps running on an application server, they may.
My experience in this, is primarily with network shares.
Basically a lot of my customers have server machines setup with lots of clients machines that have a share on the server mapped to them. Lets call it the "S" drive on the clients machines...
they install all the apps to the S drive, so they exists on the server, but get used from the clients. This type of setup will cause security exceptions on any client machine that has not configured their framework to give full trust to this application. The trust can be given in different ways, it could either be the exe specifically, the application folder, the entire shared drive, etc.... but this is a setting done FROM The client.
The tool that actually manages permissions is called caspol.exe, MS may provide methods for using this in network environments so that you dont have to go to each workstation and make manual changes.. but I am not sure how one would go about this. My installer package (INNO) runs caspol when someone runs my app, to give it permissions needed if it gets installed to a network location. I just advise my customers to run the installation on each workstation to get the proper permissions setup. Its never really any issue for me since none of my clients generally have more than 5 PCs on their network.
-
Jan 10th, 2006, 03:57 PM
#9
Re: Use a VB.NET app. located on a server
Thanks for the info!
dbelley_office - sorry for taking off with your thread!
-
Jan 10th, 2006, 03:59 PM
#10
Re: Use a VB.NET app. located on a server
 Originally Posted by szlamany
dbelley_office - sorry for taking off with your thread!
its ok.. its most likely his issue anyway
-
Jan 10th, 2006, 04:14 PM
#11
Thread Starter
Hyperactive Member
Re: Use a VB.NET app. located on a server
Yeah its fine that you discuss it.
My error is the following. In my super-simple application for test the error happens on the following line of code
This is the error: (its in french) but is a security thing.
-
Jan 10th, 2006, 04:16 PM
#12
Re: Use a VB.NET app. located on a server
yep... application.exit requires FULL TRUST to execute....
do what I described in #2 in my post above and you will not have that issue.
you notice how the top exception is a securityexception.. this is why...
-
Jan 10th, 2006, 04:36 PM
#13
Thread Starter
Hyperactive Member
Re: Use a VB.NET app. located on a server
Hi,
Sorry for being so dummy, but I went into the .Net Framework 1.1 Configuration.
I don't exactly know from there what I have to do. I added the application on the network into the folder "Applications", I'm not even sure that is something I had to do ... but I don't know where to go to set full trust for that specific application.
Thanks for helping again.
After I will have done it once, I'll know for the future.
-
Jan 10th, 2006, 04:41 PM
#14
Re: Use a VB.NET app. located on a server
No, go into the .NET framework Wizards (it will be easier for you)
when you open that you get 3 icons, select the middle one "Trust an Assembly"
follow through the prompts, and when it gets to the screen that asks for the trust level (there is a slider bar up and down) make sure you give it full trust.
That should do it for ya.
-
Jan 10th, 2006, 04:51 PM
#15
Thread Starter
Hyperactive Member
Re: Use a VB.NET app. located on a server
Oh perfect !
It works now, thanks a lot kleinma for your patience.
But you know what? I have one more question ! 
--
I saw that if I go back with the wizard, I can change the trust of my assembly (my .exe file located on the server).
But can I see that assembly now going with (.NET Framework 1.1 Configuration) ? I browsed a bit around and can't see my .exe anywhere.
-
Jan 10th, 2006, 05:04 PM
#16
Re: Use a VB.NET app. located on a server
I don't think it shows up in there.
-
Jan 29th, 2006, 11:35 AM
#17
Member
Re: Use a VB.NET app. located on a server
For creating permissions via caspol on remote machines you could try creating a .bat file that sets up the required permissions. Then apply this to all of the necessary computers via Active Directory Group Policy.
This will also ensure that the policy is re-applied at regular intervals in case it gets altered by mistake (or by a malicious user).
Chris Seary
-
Jan 29th, 2006, 12:23 PM
#18
Re: Use a VB.NET app. located on a server
 Originally Posted by oldbear
For creating permissions via caspol on remote machines you could try creating a .bat file that sets up the required permissions. Then apply this to all of the necessary computers via Active Directory Group Policy.
This will also ensure that the policy is re-applied at regular intervals in case it gets altered by mistake (or by a malicious user).
Chris Seary
if you run caspol over and over again adding permissions, it creates a new entry for each one.
When I run caspol during install of a .net app (using INNO) I always run caspol first to remove the permission set if its there, and then a second to put it back. Otherwise if it was run 10 times, it would have 10 entries.
-
Jan 30th, 2006, 02:55 AM
#19
Member
Re: Use a VB.NET app. located on a server
This is correct. At the start of the .bat file, it's best to call caspol with the -reset parameter, which sets all policies back to their defaults. Also, use the polchgprompt off parameter, otherwise caspol will expect user input for each alteration.
-
Mar 13th, 2006, 01:04 PM
#20
New Member
Re: Use a VB.NET app. located on a server
Kleinma,
Thanks a lot.. I was having similar problem on a .NET app installed on network but unable to run from client machines..fantastic article used ur step #2 and worked straight away...very useful...keep it up .
Cheers
Preethi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|