Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Giving UIPermissions to the .Net applet

Giving UIPermissions to the .Net applet

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpsecuritytutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheDen
    wrote on last edited by
    #1

    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)

    M 1 Reply Last reply
    0
    • T TheDen

      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)

      M Offline
      M Offline
      mikailcetinkaya
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • M mikailcetinkaya

        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

        T Offline
        T Offline
        TheDen
        wrote on last edited by
        #3

        the applet is not loaded to the GAC, it's loaded to some temporary internet cache. gacutil /ldl - list all utils from downloaded chache. i'm still wondering how to do that

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups