Security question for a Winforms user control on a web page

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Security question for a Winforms user control on a web page

    I have a winforms user control that I need to use in our web page. The
    control connects to a remoting object.

    When I try and make the initial connection I get an error message:

    "The application attempted to perform an operation not allowed by the
    security policy. To grant this application the required permission, please
    contact your system administrator, or use the Microsoft .NET Framework
    Configuration tool.

    That assembly does not allow partially trusted callers"

    I'm not sure what to do here. The assembly is downloaded by IE so I don't
    know how to change its' permissions.

    Thanks,
    Joe


    Joe Guest

  2. Similar Questions and Discussions

    1. user control problem access value from user control to a page
      Thanks a lot for paying attention to my problem , i tell u the problem i have a main form in which i gave a login label that points to a...
    2. Add control to asp:PlaceHolder on asp.net page from user control on same page
      Thanks for the suggestion, but I'm trying to use querystrings as a last resort. Any other ideas? Dan "Alessandro Zifiglio"...
    3. WinForms control embedded in IE
      Hello everyone, I have a .NET Windows User Control hosted in an .aspx page using the Object tag. This User Control needs to reference a thrid...
    4. Custom Server Control works on page but not User Control...why?
      I'm developing the DevEdit.NET server control (an online HTML editor - www.devedit.com) but there's an extremely bizarre bug. The control runs fine...
    5. Page Load fired 3 times Web user control is embedded in a custom control
      Hi, I have built a custom control that build a table with 3 cells in it. The custom control is designed to add all child controls to cell#2,...
  3. #2

    Default Re: Security question for a Winforms user control on a web page

    You need to set the AllowPartiallyTrustedClient in your AssemblyInfo, and
    create a security policy in the .Net Configuration for your code. See this
    thread: "Security Exception - Winform usercontrol hosted in ASP.NET" and
    there's more info here as well:
    [url]http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx[/url]
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1[/url]
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp[/url]
    [url]http://www.eggheadcafe.com/articles/20021205.asp[/url]
    [url]http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx[/url]
    [url]http://blogs.msdn.com/shawnfa/archive/2004/09/07/226530.aspx[/url]

    HTH,
    sbl



    "Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
    news:%23YSHZ%2355EHA.128@TK2MSFTNGP15.phx.gbl...
    > I have a winforms user control that I need to use in our web page. The
    > control connects to a remoting object.
    >
    > When I try and make the initial connection I get an error message:
    >
    > "The application attempted to perform an operation not allowed by the
    > security policy. To grant this application the required permission, please
    > contact your system administrator, or use the Microsoft .NET Framework
    > Configuration tool.
    >
    > That assembly does not allow partially trusted callers"
    >
    > I'm not sure what to do here. The assembly is downloaded by IE so I don't
    > know how to change its' permissions.
    >
    > Thanks,
    > Joe
    >
    >

    Scott Leonard Guest

  4. #3

    Default Re: Security question for a Winforms user control on a web page

    Great links - Thanks!
    I already had the APTC attribute but it didn't help. The reason was due to
    the remoting. There were a number of other exceptions being thrown also. I
    ended up setting my Internet zone to full trust to test it and it worked
    fine.

    I'm going to read the info in the links which I'm sure will solve my
    problem.

    Thanks again,
    Joe

    "Scott Leonard" <sbl@newsgroups.nospam> wrote in message
    news:OKm2CUF6EHA.2804@TK2MSFTNGP15.phx.gbl...
    > You need to set the AllowPartiallyTrustedClient in your AssemblyInfo, and
    > create a security policy in the .Net Configuration for your code. See this
    > thread: "Security Exception - Winform usercontrol hosted in ASP.NET" and
    > there's more info here as well:
    > [url]http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx[/url]
    > [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1[/url]
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp[/url]
    > [url]http://www.eggheadcafe.com/articles/20021205.asp[/url]
    > [url]http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx[/url]
    > [url]http://blogs.msdn.com/shawnfa/archive/2004/09/07/226530.aspx[/url]
    >
    > HTH,
    > sbl
    >
    >
    >
    > "Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
    > news:%23YSHZ%2355EHA.128@TK2MSFTNGP15.phx.gbl...
    > > I have a winforms user control that I need to use in our web page. The
    > > control connects to a remoting object.
    > >
    > > When I try and make the initial connection I get an error message:
    > >
    > > "The application attempted to perform an operation not allowed by the
    > > security policy. To grant this application the required permission,
    please
    > > contact your system administrator, or use the Microsoft .NET Framework
    > > Configuration tool.
    > >
    > > That assembly does not allow partially trusted callers"
    > >
    > > I'm not sure what to do here. The assembly is downloaded by IE so I
    don't
    > > know how to change its' permissions.
    > >
    > > Thanks,
    > > Joe
    > >
    > >
    >
    >

    Joe Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139