Security Exception

  • Thread starter Thread starter tommy
  • Start date Start date
T

tommy

Hello,

I took over a little c#-command-line-programm(connect a db and creates
a cvs-file) for upgrading.
I always get a security exception when I`m running it from the network
on other clients.

developer-machine: all works fine- from local and from network.

on client-machines: it works locally, but from network I get the
security exception

I tried to set a lower security-level, and registrated the assembly at
the client, but no solve.

what am I doing wrong, or what I have to do, for starting the exe from
any client without security exception.
the "original"-exe does it!

any suggestions?


best regards

tommy
 
What you are seeing is Code Access Security crashing your party. .NET's security infrastructure places security restructions based on the code's origins (physical or author) and by default fully trusts code residing on the hard-disk but only partially trusts code from elsewhere (including from the network share. My guess is that the dev machine has had security policy changed to trust code from this network location whereas the client hasn't. Therefore it works on the dev machine and not the client. You have three options:

1. Always run the software from the software from the hard disk of the client
2. Alter security policy on the client
3. Change the program so it doesn't need the failing permission.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hello,

I took over a little c#-command-line-programm(connect a db and creates
a cvs-file) for upgrading.
I always get a security exception when I`m running it from the network
on other clients.

developer-machine: all works fine- from local and from network.

on client-machines: it works locally, but from network I get the
security exception

I tried to set a lower security-level, and registrated the assembly at
the client, but no solve.

what am I doing wrong, or what I have to do, for starting the exe from
any client without security exception.
the "original"-exe does it!

any suggestions?
 
hello richards,

thnak you very much for answering.
i solve the problem --

a great hurly-burly--

ms should be punished for that

but thank you

best regards
tommy

----------------------------------------
HangulHanjaFastConversion-Eigenschaft

True if Microsoft Word automatically converts a word with
only one suggestion during conversion between hangul
and hanja. Read/write Boolean.
 
I disagree

I think that lowering the default permissions for code loaded from remote locations is a good idea IMO. Code Access Security (CAS) is designed to prevent code that isn't trusted from doing things you don't want it to. And until you tell it the remote code is trusted it sandboxes it.

In fact the default permission fro local machine should be lower IMO - but that means software developers generally being aware of CAS for that to work.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk


ms should be punished for that
 
Back
Top