Click here to Skip to main content
15,907,497 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Difference in data types Pin
Christian Graus9-Feb-05 11:09
protectorChristian Graus9-Feb-05 11:09 
GeneralRe: Difference in data types Pin
S. Senthil Kumar9-Feb-05 19:20
S. Senthil Kumar9-Feb-05 19:20 
QuestionEasy way to localize an app? - Managing Localization? Pin
Simon Kittle9-Feb-05 4:59
Simon Kittle9-Feb-05 4:59 
QuestionHow to get Physical Address of NIC? Pin
thainam8-Feb-05 16:54
thainam8-Feb-05 16:54 
AnswerRe: How to get Physical Address of NIC? Pin
C# Genius10-Feb-05 8:56
C# Genius10-Feb-05 8:56 
GeneralNET debuggers do not work Pin
rwestgraham8-Feb-05 9:01
rwestgraham8-Feb-05 9:01 
GeneralRe: NET debuggers do not work Pin
rwestgraham8-Feb-05 13:15
rwestgraham8-Feb-05 13:15 
GeneralStrongNameIdentityPermission issue Pin
tflagg8-Feb-05 6:37
tflagg8-Feb-05 6:37 
OK, I'm ready to be ridiculed.
I've run into an issue when attempting to use strong names. I've followed darwen's example and have it working in a console app, but it fails in a windows app with
An unhandled exception of type 'System.Security.SecurityException' occurred in StrongNameTestForm.exe

Additional information: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

(additional details at the bottom of this message) or (if not run in the ide)
The application attempted to perform an operation not allowed by the security policy. The operation required the SecurityException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy administration tool.

If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately.

Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlig, Version-1.0.50000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.


If I change the application from a windows app to a console app the call works in main() [before Application.Run(new Form1());], but not in the button click event from the form.

I've run the .NET Configuration tool (mscorcfg.msc) and tried adding an application and adding a code group (enterprise, machine, and user; new code group with a condition of Strong Name with the public key [the dll, the console app, and the windows app all show the same public key] without specifying the name or version and with the permission set of full trust) all to no avail. I have also tried this on multiple machines.

I do have a small (59k) zip file of my solution and projects, if anyone is interested.

Additional details:
************** Exception Text **************
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckTokenBasedSetHelper(Boolean ignoreGrants, TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet denied, PermissionSet demands)
at StrongNameAssembly.StrongNameTestAssembly.StaticEcho(String text) in C:\dl\dotNET\code samples\Securing\StrongNameTest\StrongNameAssembly\StrongNameTestAssembly.cs:line 31
at StrongNameTestForm.Form1.btnStaticTest_Click(Object sender, EventArgs e) in c:\dl\dotnet\code samples\securing\strongnametest\strongnametestform\form1.cs:line 108
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The state of the failed permission was:
<ipermission class="System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
="" version="1" publickeyblob="002400000480000094000000060200000024000052534131000400000100 01009515D3907C35834756D430D20B8C4672668C3CAC0EFF041317166F8CC53FDA01CE72D7C 728A942762957F6A7A2264656EBCE5C04078AAFD3E6F7FFFB6ADC799AB011CED46D9B6129F1 1E6517144138B57C85865CBC56E4F2BFFF6651F3FF702F0E039F16CEE9F31B976B51A582977 478B3DD0A52CAC873814646F01FABC8E2BE">



************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
StrongNameTestForm
Assembly Version: 1.0.1865.20729
Win32 Version: 1.0.1865.20729
CodeBase: file:///C:/dl/dotNET/code%20samples/Securing/StrongNameTest/StrongNameTestForm/bin/Debug/StrongNameTestForm.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
StrongNameAssembly
Assembly Version: 1.0.1865.19430
Win32 Version: 1.0.1865.19430
CodeBase: file:///C:/dl/dotNET/code%20samples/Securing/StrongNameTest/StrongNameTestForm/bin/Debug/StrongNameAssembly.DLL
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

GeneralRe: StrongNameIdentityPermission issue Pin
tflagg8-Feb-05 10:00
tflagg8-Feb-05 10:00 
GeneralClass library load Pin
QuaKx7-Feb-05 20:53
QuaKx7-Feb-05 20:53 
GeneralRe: Class library load Pin
S. Senthil Kumar8-Feb-05 10:15
S. Senthil Kumar8-Feb-05 10:15 
QuestionOnDisconnect? Pin
Magnus277-Feb-05 5:59
Magnus277-Feb-05 5:59 
Generalworking with .NET 2.0 and .NET 1.1 Pin
TheSnakeByte6-Feb-05 22:11
TheSnakeByte6-Feb-05 22:11 
Generalcolumn name error Pin
Rekha Patel5-Feb-05 10:42
Rekha Patel5-Feb-05 10:42 
GeneralRe: column name error Pin
Robert Rohde5-Feb-05 20:46
Robert Rohde5-Feb-05 20:46 
GeneralRe: column name error Pin
Rekha Patel6-Feb-05 6:07
Rekha Patel6-Feb-05 6:07 
GeneralAbout .NET framework history Pin
Andres Coder5-Feb-05 6:07
Andres Coder5-Feb-05 6:07 
GeneralRe: About .NET framework history Pin
Michael P Butler5-Feb-05 6:49
Michael P Butler5-Feb-05 6:49 
GeneralRe: About .NET framework history Pin
Andres Coder5-Feb-05 11:23
Andres Coder5-Feb-05 11:23 
Generalchecking values in datagrid rows Pin
Rekha Patel4-Feb-05 14:03
Rekha Patel4-Feb-05 14:03 
GeneralRe: checking values in datagrid rows Pin
Bhoot Girish D4-Feb-05 18:30
sussBhoot Girish D4-Feb-05 18:30 
GeneralRe: checking values in datagrid rows Pin
Thang T.4-Feb-05 22:54
Thang T.4-Feb-05 22:54 
Generaldeploying .net apps with nsis Pin
fire.fox3-Feb-05 19:44
fire.fox3-Feb-05 19:44 
GeneralRe: deploying .net apps with nsis Pin
Charlie Williams4-Feb-05 6:20
Charlie Williams4-Feb-05 6:20 
GeneralRe: deploying .net apps with nsis Pin
Steve Maier4-Feb-05 10:09
professionalSteve Maier4-Feb-05 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.