.Net 2.0 security configuration

Are there any help resources or can someone give me a brief idea on how to configure .net 2 runtime security policies for the following scenario:

I have a window control hosted in IE. The control is trying to read from the serial port and write to the event log. Both of these operations do not work due to browser security restrictions:

A permission request of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 failed.

A permission request of type "System.Diagnostics.EventLogPermission, System, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 failed.

I have installed full trust for my site by adding it to the list of fully trusted sites in IE, but I still have a problem. I am sure the answer is in the runtime security policy in the .net 2.0 configuration, but I just don't know what to change.

+3
source share
2 answers

Try the following:

Control Panel → Administrative Tools → Microsoft.NET Framework 2.0 Configuration

Expand and select:

. Net Framework 2.0 Configuration → MyComputer → Runtime Security Policy → Machine → Code Groups → All_Code

Under this, there are different zones. I'm not sure which one applies to IE and your scenario, but try the following for each one (remember to install them after testing)

"?????? _ Zone" " " " " " "

" " , .

+2

( ), IIS, , I_USRmachinename , , , ​​ "", , . / I_USR, I_WAM ASP.NET , . , , .

-1

All Articles