Security question for a Winforms user control on a web page

Discussion in 'ASP .Net Security' started by Joe, Dec 21, 2004.

  1. Joe

    Joe Guest

    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, Dec 21, 2004
    #1
    1. Advertising

  2. 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:
    http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx
    http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp
    http://www.eggheadcafe.com/articles/20021205.asp
    http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx
    http://blogs.msdn.com/shawnfa/archive/2004/09/07/226530.aspx

    HTH,
    sbl



    "Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
    news:%23YSHZ%...
    > 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, Dec 22, 2004
    #2
    1. Advertising

  3. Joe

    Joe Guest

    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" <> wrote in message
    news:...
    > 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:
    > http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;311301&FR=1
    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11122002.asp
    > http://www.eggheadcafe.com/articles/20021205.asp
    > http://msdn.microsoft.com/msdnmag/issues/02/01/userctrl/default.aspx
    > http://blogs.msdn.com/shawnfa/archive/2004/09/07/226530.aspx
    >
    > HTH,
    > sbl
    >
    >
    >
    > "Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
    > news:%23YSHZ%...
    > > 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, Dec 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe
    Replies:
    1
    Views:
    510
  2. Joe
    Replies:
    0
    Views:
    374
  3. Joe
    Replies:
    1
    Views:
    422
  4. =?Utf-8?B?U2VnZmFobHQ=?=

    Problem with WinForms User Control Hosted in IE

    =?Utf-8?B?U2VnZmFobHQ=?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    657
    Steven Cheng[MSFT]
    Jan 13, 2006
  5. Mark
    Replies:
    1
    Views:
    3,743
    simida
    Jul 28, 2006
Loading...

Share This Page