Giving UIPermissions to the .Net applet
-
Hi everyone. i've written Photo editor. Currently it is WindowsApp. I need to put it on the site. It's done by putting original APP to the WinControl. And that dll can be used on the site, like: The problem first big problem - is that i can't use unmanaged code, i needed to put some UnmanagedCode permissions. I've made big changes to the logic of it - and it doesn't use unmanaged code no more. Onve i've finished convertion app to Control, i found that new permissions should be given: Request of the Permission of type System.Security.Permissions.UIPermissions (details in the end) This is done when i use mouse (clicking on the workspace), when i'm changing the font - it appears after the standard dialog is closed. From this point i need to solve this problem somehow. I've tried to put the AssemblyKeyFile - but when i do that, applet isn't loaded at all. Somewhere i've read that client that will use this editor needs to put PublicKeyToken to his trusted keys - but i can't find where do i put that. Have anybody got some ideas of how to handle that? Thanks for help. Details of exception System.Security.SecurityException: Request for the permission of type System.Security.Permissions.UIPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.Windows.Forms.Control.Focus() at ImageEditor.ImageEditor.pFore_MouseDown(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.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)
-
Hi everyone. i've written Photo editor. Currently it is WindowsApp. I need to put it on the site. It's done by putting original APP to the WinControl. And that dll can be used on the site, like: The problem first big problem - is that i can't use unmanaged code, i needed to put some UnmanagedCode permissions. I've made big changes to the logic of it - and it doesn't use unmanaged code no more. Onve i've finished convertion app to Control, i found that new permissions should be given: Request of the Permission of type System.Security.Permissions.UIPermissions (details in the end) This is done when i use mouse (clicking on the workspace), when i'm changing the font - it appears after the standard dialog is closed. From this point i need to solve this problem somehow. I've tried to put the AssemblyKeyFile - but when i do that, applet isn't loaded at all. Somewhere i've read that client that will use this editor needs to put PublicKeyToken to his trusted keys - but i can't find where do i put that. Have anybody got some ideas of how to handle that? Thanks for help. Details of exception System.Security.SecurityException: Request for the permission of type System.Security.Permissions.UIPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.Windows.Forms.Control.Focus() at ImageEditor.ImageEditor.pFore_MouseDown(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.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)
on the browser computer you need to run a specific .net commandline command that can be gacutil(global assembly cache utility) with proper permissions and keyfiles specified. pls look at its usage on msdn Mikail Çetinkaya . The C# DEveloper
-
on the browser computer you need to run a specific .net commandline command that can be gacutil(global assembly cache utility) with proper permissions and keyfiles specified. pls look at its usage on msdn Mikail Çetinkaya . The C# DEveloper