Results 1 to 4 of 4

Thread: [2005] "End" under partial trust

  1. #1

    Thread Starter
    Hyperactive Member ZaNi's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    360

    [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

  2. #2
    Lively Member
    Join Date
    Jun 2006
    Location
    City of Angles. Right Angles.
    Posts
    110

    Re: [2005] "End" under partial trust

    Highly suggest you don't use End. It's a hold-over from long since dead VB versions.

    Use Application.Exit to kill your app.

  3. #3

    Thread Starter
    Hyperactive Member ZaNi's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    360

    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.

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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.
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width