|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Security permissions issuehandle situations when the app is run from a network share. I've written some code in the main form constructor to attempt to access the registry. I've put this code inside a try/catch block and my app correctly displays a nice error message to the user that the app will end. When this occurs, I call Application.Exit() to exit out of my app but that causes another security exception (I guess the Application.Exit requires permissions that aren't available). I've read some sites online that say the best solution is just to call the ..Close function for the form rather than Application.Exit. This isn't working correctly, maybe because you can't call Close in the constructor? (A security exception occurs anyway) Do I need to move all of this code to the ..Load function or is there a better way to handle this? (Ideally, my app shouldn't just exit, but I'll cross that bridge when I get this working) Any help would be appreciated. Rich Moore |
|||||||||||||||||||||||