Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security Exception in Windows Apps

Status
Not open for further replies.

scking

Programmer
Jan 8, 2001
1,263
US
I'm Attempting to learn VB.NET and have been receiving the error described every time I try to build a Windows application. It errors out in the vb.net generated code for initializing the components. The application failing was a very small application (FileSystemWatcher) documented in the .NET help walkthroughs. I've successfully built other types of projects but windows always fail. I have a theory that this is associated with either System.IO or my computer's configuration. I get the following error

Unhandled Exception: System.Security.SecurityException: Request failed.

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"

Debug traps at:
'This call is required by the Windows Form Designer.
InitializeComponent()

Works if comment out last line where the FileSystemWatcher is instantiated
and all other FileSystemWatcher lines
InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.myWatcher = New System.IO.FileSystemWatcher


---------------------
scking@arinc.com
---------------------
 
What OS are you developing/testing on?

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
chiph

It's working on Windows XP and failing on Windows 2000.



---------------------
scking@arinc.com
---------------------
 
Has anyone been messing around with the framework security permissions on the Win2k box? Because the default permissions will allow this.

Another question: What user are you running as on the Win2k box? The ASP.NET user has virtually no permissions out of the box (by design). You have to add permissions for it to do almost anything other than serve basic pages.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
No one has been messing with the framework security permissions. How are they managed? I don't know how to check them and I've not seen anything about it with a thorough search.


---------------------
scking@arinc.com
---------------------
 
Checking help for CAS opens a whole new world. I'll check it but am still wondering why I can't run the walkthough apps right out of the box when I'm administrator and loaded the framework without indicating security options.


---------------------
scking@arinc.com
---------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top