XmlSerialization of classes with declarative Security

From: Doug Holland (DougHolland_at_discussions.microsoft.com)
Date: 02/26/05

  • Next message: JFN: "Re: Compile assembly in runtime and execute in sandbox"
    Date: Sat, 26 Feb 2005 11:05:02 -0800
    
    

    I'm working on a project where I have to pass a serialized object to a
    ASP.NET web service and I recieve an exception because that the object cannot
    be serialized due to declarative security.

    The object in question is an Exception class and as such I cannot change the
    declarative security to imperative security permissions or demans in property
    accessors because I do not own the code to the Exception class.

    The following support article details how to do this in this way.

    http://support.microsoft.com/?kbid=326971

    Is there a way that I can allow a WebMethod to take an Exception as a
    parameter and not recieve the security exception that results from attempting
    to serialize a class with declarative security?

    Thanks in advance

    Doug Holland


  • Next message: JFN: "Re: Compile assembly in runtime and execute in sandbox"

    Relevant Pages

    • Collection Xml Serialization
      ... I've developed a couple of strongly-typed collections and marked them as ... however when I attempt to serialize instances of the ... collection I recieve the following exception: ... Still produced the same exception... ...
      (microsoft.public.dotnet.general)
    • Re: Serialize session state & OutOfMemoryError?
      ... > Unable to serialize the session state. ... An unhandled exception occurred during the execution of the ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: Unable to serialize the session state
      ... to an ASP Session State database (SQL Server 2000). ... Unable to serialize the session state. ... Exception Details: System.Web.HttpException: Unable to serialize the session ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Unable to serialize the session state
      ... Being that we are pushing a datatable into session state db are there any ... to an ASP Session State database (SQL Server 2000). ... Unable to serialize the session state. ... Exception Details: System.Web.HttpException: Unable to serialize the ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Unable to serialize the session state
      ... to an ASP Session State database (SQL Server 2000). ... Unable to serialize the session state. ... An unhandled exception occurred during the execution of the ...
      (microsoft.public.dotnet.framework.aspnet)