Security Exception

Z

zdrakec

Hello all:

I have an application that shells out to another app (to run
asynchronously), but I am receiving the following error at the time I
call the second app:

"Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=<<value>>"

I have tried a couple of things, with no success, and I am able to run
the app in question from the VS IDE (it's part of the same solution).
But when I call it from the other application, it fails as above.

My perusal of the documentation has left me, if anything, more puzzled
that when I started.

I would greatly appreciate being pointed in the right direction!

Cheers,
zdrakec
 
C

Chris

zdrakec said:
Hello all:

I have an application that shells out to another app (to run
asynchronously), but I am receiving the following error at the time I
call the second app:

"Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=<<value>>"

I have tried a couple of things, with no success, and I am able to run
the app in question from the VS IDE (it's part of the same solution).
But when I call it from the other application, it fails as above.

My perusal of the documentation has left me, if anything, more puzzled
that when I started.

I would greatly appreciate being pointed in the right direction!

Cheers,
zdrakec

Are you callling an app on a remote drive. Try to fully trust the
application in .net security wizard.

Chris
 
G

Guest

zdrakec

Here is what you need to do.

When you are running a .net Application from a network drive it requires a
secrity policy setting. You need to open notepad, copy thses commands into it.

C:
CD\
CD C:\WINNT\Microsoft.NET\Framework\v1.1.4322\
CLS
caspol -machine -chggroup LocalIntranet_Zone FullTrust

save it as .bat (batch file - this way you can ship as part of your
application deployment stratgey).

Then log into each users machine as administrator and execute the batch
file. It will ask you do you want to change the security policy, say yes.
Have the user log in again and away you go.
 
Z

zdrakec

Hello marc, Chris:

When I execute the above, my system does not recognize "caspol" - is it
hiding somewhere in my directory path?

Thanks much,
zdrakec
 
Z

zdrakec

Well, never mind that, I'm an idiot, the .NET framework directory is in
my Windows, not WinNT, folder :)

Batch file ran okay, now we'll see if that fixed the problem.

Cheers,
zdrakec
 
Z

zdrakec

Thou be the man, marc...that did indeed resolve the issue! Thank you
sir!!!

zdrakec
 
G

Guest

No worries zdrakec.
I was just talking to a network security guy here and basically it means
that as a hacker you must penetrate the machine that you have used caspol to
free up managed code. In other words if you have sensitive info within your
managed code, then it will be open should this machine get attacked. Be
careful with fullTrust when using an enterprise wide application. I have six
users and have been recommended I lock this down more. I think there seven
levels of trust so I am going to build up from LowTrust upward until I find a
more adequate solution.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top