Re: Standalone VB.Net app?



The way I got around these security exceptions was to use the .net
configuration wizard to set the appropriate permissions and then create
a deployement package. Then our network admin created a logon script to
run the msi. Would that be a posibility?

Thanks,

Seth Rowe


JackBlack wrote:
Chris, thanks for replying!

Well, a couple things: First, running caspol as you suggested below
(substituting the appropriate machine names and file paths, of course) had
no effect whatsoever. I still get a UIPermissions exception when the
program is executed by the average domain user. Additionally, when a user
with local Admin privileges and elevated domain privs executes the app now,
it starts up fine, but upon clicking the CommandButton that terminates the
program, I now get a SecurityPermission exception.

Second, if this command needs to be run at each workstation, then it kinda
defeats the purpose of having a stand-alone app, doesn't it? If I have to
touch each machine, I might as well just do a normal installation to the
local machine (setup.exe route), right?

Additionally, the caspol.exe app can only be run by an administrator, so
even that can't be scripted (requiring that I touch each machine). So we're
still at square one, no?

Having read a bit more, it seems that the "xcopy distribution" method isn't
really true. What I need to be able to do is take an executable, drop it on
a network device that the average network user has read/execute privs on,
and have it run from a login script, without having to touch any of the
machines. Is this do-able?

Much thanks again,
Jack







"Chris Dunaway" <dunawayc@xxxxxxxxx> wrote in message
news:1163600976.368338.220460@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
JackBlack wrote:

(it'll be called from a domain login script and run from a network share
that all users have Read
& Execute privs to).

That is the problem right there. Because the app is on a network
share, the .Net framework on the local machine is not allowing the code
to execute because it is not trusted. You need to use caspol.exe to
grant trust on the local machine to that application.

Here is the command we use:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag All_Code
-url file://server/folder/* FullTrust -n AppName

This grants full trust on the client machine to the application on the
network share.


.