[2005] "End" under partial trust
The setup I am using has the files stored on a network server. In VS this defaults to meaning not allowing full permissions to the program being developed. I have a couple of questions surrounding this issue:
1) Is there any way to allow the command "End" without full security permissions (I went through and allowed/disallowed each permission set in turn in the Form1 Properties -> Security tab and couldn't get it to work except under full permissions)?
2) Will the security permissions I give the application (in the Form1 Properties -> Security tab) affect the final application in any way (ie when it is distributed)?
I found that to be able to save/load I needed to enable I/O permissions (fairly intuitive assuming you know where to find the option), but I'm stumped by this "End" business.
btw If I didnt make it clear, the command End I'm refering to stops the entire program (exits). Any thoughts would be appreciated
Re: [2005] "End" under partial trust
Highly suggest you don't use End. It's a hold-over from long since dead VB versions. :sick:
Use Application.Exit to kill your app.
Re: [2005] "End" under partial trust
Thanks for the suggestion, but I'm still getting a security exception
Edit: Details:
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Re: [2005] "End" under partial trust
If you are running a WindowsApp it's better to "Close" all forms instead of calling (Application.Exit) directly.