A Security Problem

  • Thread starter Thread starter Dom
  • Start date Start date
D

Dom

I have a program finished, I created the exe, I tested it, works
fine. I move the exe to a network drive so that others can use it,
and suddenly it fails. The problem seems to be a security problem,
since the program tries to access the backend through SQLConnection,
etc.

When I move the program to the user's local drive it works fine. So I
assume there is something about the network that stops it.

How do I get out of this? I really don't want to keep it on the
user's local drive.
 
I have a program finished, I created the exe, I tested it, works
fine. I move the exe to a network drive so that others can use it,
and suddenly it fails. The problem seems to be a security problem,
since the program tries to access the backend through SQLConnection,
etc.

When I move the program to the user's local drive it works fine. So I
assume there is something about the network that stops it.

How do I get out of this? I really don't want to keep it on the
user's local drive.

You're running into a code access security. There are ways around it,
but you'll have to change or edit the security policy and allow full
trust to *.exe.
 
You're running into a code access security. There are ways around it,
but you'll have to change or edit the security policy and allow full
trust to *.exe.

Can you give me some tips on how to do this? Is it done within Visual
Studio, or do I go to the control panel?
 
Can you give me some tips on how to do this? Is it done within Visual
Studio, or do I go to the control panel?

You'll have to get the users to meddle their .NET configuration, but I
haven't got that down to a science, yet.

These links helped me a understand more about the exception:
http://msdn2.microsoft.com/en-us/library/930b76w0.aspx
http://www.codeproject.com/KB/security/UB_CAS_NET.aspx#Overriding Security

After tinkering with my configuration, I figured it'd be harder to get
users to do this instead of just having them download a local copy.

I currently have my users download the application and run it locally.
When the application loads, it auto-checks the current version out on
the network to make sure they have the latest version and notifies
them if it isn't the latest.

good luck,
-tom
 
Back
Top