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. Web Development
  3. ASP.NET
  4. Permissions Exception with client-side execution of a C# user control and dependent assembly

Permissions Exception with client-side execution of a C# user control and dependent assembly

Scheduled Pinned Locked Moved ASP.NET
csharphelpjavascripthtmldotnet
3 Posts 1 Posters 3 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.
  • V Offline
    V Offline
    Victor Vogelpoel
    wrote on last edited by
    #1

    Keywords: client-side execution of a C# user control, security permissions, code groups, strongname. Level: advanced I have a problem with security settings getting a downloaded dependent assembly to run client-side in a web page. The error is: "Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c61934e089 failed." I can't seem to find a narrow enough security/permission settings. Introducing my environment: I'm working on getting a payment device, ATM or whatever it is called in your country (Dutch: PIN apparaat) to work from a Internet Explorer client in an intranet WEB application. - The device is connected to a webterminal PC (COM1 port). The PC has the .Net framework installed. - The two assemblies involved reside on the intranet webserver and are downloaded by Internet Explorer when the HTML page is rendered. I have a Forms.Control derived class in assembly PINControl.dll. The assembly is in the same webfolder as the test.html file which contains an object tag to download the assembly from the webserver and invoke the control client-side: The control loads and starts up just fine and displays some debugging information so I can monitor execution (the control is supposed to run faceless later on and just communicate with the payment device). The control also depends on another assembly Pin.dll, which contains the communication and application level logic to handle a payment transaction using the payment device. So there are TWO assemblies involved: the forms control and the payment logic assembly. Using javascript in test.html, a transaction is initiated (execution blocks while PIN.Transact is working) function Transact() { //var bedrag = document.all.bedrag.value; var amount = 10.50; if (PIN.Transact(amount)) alert("SUCCESS"); else alert("FAILURE"); } Both assemblies have strong names (using different keys) and use the [assembly: System.Security.AllowPartiallyTrustedCallers] attribute. The whole environment ONLY works when the LocalIntranet_Zone CodeGroup has a FullTrust for the ZoneMembershipCondition LocalIntranet zone or URLMembershipCondition "http://localhost/\*". I don't like the idea of fully trusting every assembly that comes from the server (for now locally). Also, to limit per

    V 2 Replies Last reply
    0
    • V Victor Vogelpoel

      Keywords: client-side execution of a C# user control, security permissions, code groups, strongname. Level: advanced I have a problem with security settings getting a downloaded dependent assembly to run client-side in a web page. The error is: "Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c61934e089 failed." I can't seem to find a narrow enough security/permission settings. Introducing my environment: I'm working on getting a payment device, ATM or whatever it is called in your country (Dutch: PIN apparaat) to work from a Internet Explorer client in an intranet WEB application. - The device is connected to a webterminal PC (COM1 port). The PC has the .Net framework installed. - The two assemblies involved reside on the intranet webserver and are downloaded by Internet Explorer when the HTML page is rendered. I have a Forms.Control derived class in assembly PINControl.dll. The assembly is in the same webfolder as the test.html file which contains an object tag to download the assembly from the webserver and invoke the control client-side: The control loads and starts up just fine and displays some debugging information so I can monitor execution (the control is supposed to run faceless later on and just communicate with the payment device). The control also depends on another assembly Pin.dll, which contains the communication and application level logic to handle a payment transaction using the payment device. So there are TWO assemblies involved: the forms control and the payment logic assembly. Using javascript in test.html, a transaction is initiated (execution blocks while PIN.Transact is working) function Transact() { //var bedrag = document.all.bedrag.value; var amount = 10.50; if (PIN.Transact(amount)) alert("SUCCESS"); else alert("FAILURE"); } Both assemblies have strong names (using different keys) and use the [assembly: System.Security.AllowPartiallyTrustedCallers] attribute. The whole environment ONLY works when the LocalIntranet_Zone CodeGroup has a FullTrust for the ZoneMembershipCondition LocalIntranet zone or URLMembershipCondition "http://localhost/\*". I don't like the idea of fully trusting every assembly that comes from the server (for now locally). Also, to limit per

      V Offline
      V Offline
      Victor Vogelpoel
      wrote on last edited by
      #2

      Working on a intranet webbased Information System, I have a device connected to the COM1 port of one of the clients. Assembly Pin.dll contains all logic to communicate to and handle the device's messages. Assembly PinControl.dll contains a Forms.Control derived control. This control is used client-side in an Internet Explorer webpage (and it uses Pin.dll). THE QUESTION What security permissions, codegroups and measures to I need to take to ONLY allow these two assemblies to run on an intranet IE client, preferably only from the designated Intranet webserver? VictorV

      1 Reply Last reply
      0
      • V Victor Vogelpoel

        Keywords: client-side execution of a C# user control, security permissions, code groups, strongname. Level: advanced I have a problem with security settings getting a downloaded dependent assembly to run client-side in a web page. The error is: "Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c61934e089 failed." I can't seem to find a narrow enough security/permission settings. Introducing my environment: I'm working on getting a payment device, ATM or whatever it is called in your country (Dutch: PIN apparaat) to work from a Internet Explorer client in an intranet WEB application. - The device is connected to a webterminal PC (COM1 port). The PC has the .Net framework installed. - The two assemblies involved reside on the intranet webserver and are downloaded by Internet Explorer when the HTML page is rendered. I have a Forms.Control derived class in assembly PINControl.dll. The assembly is in the same webfolder as the test.html file which contains an object tag to download the assembly from the webserver and invoke the control client-side: The control loads and starts up just fine and displays some debugging information so I can monitor execution (the control is supposed to run faceless later on and just communicate with the payment device). The control also depends on another assembly Pin.dll, which contains the communication and application level logic to handle a payment transaction using the payment device. So there are TWO assemblies involved: the forms control and the payment logic assembly. Using javascript in test.html, a transaction is initiated (execution blocks while PIN.Transact is working) function Transact() { //var bedrag = document.all.bedrag.value; var amount = 10.50; if (PIN.Transact(amount)) alert("SUCCESS"); else alert("FAILURE"); } Both assemblies have strong names (using different keys) and use the [assembly: System.Security.AllowPartiallyTrustedCallers] attribute. The whole environment ONLY works when the LocalIntranet_Zone CodeGroup has a FullTrust for the ZoneMembershipCondition LocalIntranet zone or URLMembershipCondition "http://localhost/\*". I don't like the idea of fully trusting every assembly that comes from the server (for now locally). Also, to limit per

        V Offline
        V Offline
        Victor Vogelpoel
        wrote on last edited by
        #3

        (got it after much, much,much reading and trying) VictorV

        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