"An unhandled exception of type 'System.Security.SecurityException' " VB .NET

S

Sabo, Eric

We are an educational environment, we are using VB .Net and Windows XP SP2.
The users are power users.
We have a Visual Basic .Net class that is having trouble with their project,
they are getting the following error message "An unhandled exception of type
'System.Security.SecurityException'".

Does anyone have any suggestions?
 
H

Herfried K. Wagner [MVP]

Sabo said:
We are an educational environment, we are using VB .Net and Windows XP
SP2. The users are power users.
We have a Visual Basic .Net class that is having trouble with their
project, they are getting the following error message "An unhandled
exception of type 'System.Security.SecurityException'".

When/where is this exception thrown? Can you post the complete exception
text (+ callstack)?
 
C

chanmmn

Have you try to run it with Administrator group? If it can run under
Administrator but not Power User then it is easier for you to trace.

chanmm
 
A

Adrian

you probably needed to add permissions

control panel - Administrative Tools - Microsoft .NET Framework 1.1
Configuration - Runtime Security Policy - Machine - Code Groups - All_Code

chanmmn said:
Have you try to run it with Administrator group? If it can run under
Administrator but not Power User then it is easier for you to trace.

chanmm
 
S

Sabo, Eric

Adrian,
How do I do this? Do you have a how-to tech net article?



Adrian said:
you probably needed to add permissions

control panel - Administrative Tools - Microsoft .NET Framework 1.1
Configuration - Runtime Security Policy - Machine - Code Groups - All_Code
 
S

Sabo, Eric

I can't because I only have it as a screen snap shot in a word document.

What are some of the things that I could look for?

Everyone says to do the following:

control panel - Administrative Tools - Microsoft .NET Framework 1.1
Configuration - Runtime Security Policy - Machine - Code Groups - All_Code

Is there a technet article that would explain how to do this?
 
H

Herfried K. Wagner [MVP]

Sabo said:
I can't because I only have it as a screen snap shot in a word document.

OK :-(.
What are some of the things that I could look for?

From examining the exception text visible in the screenshot you posted, I
assume that the reason for the exception is that you are calling 'End' in
the exit button ('btnExit'). Calling 'End' requires certain permissions.
The documentation of the 'End' statement describes these permissions,
information on how to request these permissions can be found in articles
referenced in the documentation's "See Also" area on the bottom of the page:

Visual Basic Language Reference -- 'End' Statement
<URL:http://msdn.microsoft.com/library/en-us/vblr7/html/vastmEnd.asp>

If my assumption is not correct, you may want to post the code you placed in
the exit button's 'Click' event handler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top