.NET Framework Developer Center > .NET Development Forums > .NET Remoting and Runtime Serialization > System.TypeLoadException when loading a proxy class in reflection
Ask a questionAsk a question
 

QuestionSystem.TypeLoadException when loading a proxy class in reflection

  • Monday, November 02, 2009 5:28 PMNo Name No Face Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    System.TypeLoadException: Could not load type 'CooperK2.ApplicationUserOverrideWebService.User' from assembly 'CooperK2, Version=2.0.3589.15871, Culture=neutral, PublicKeyToken=null'.
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterApplicationUserOverride.Write5_GetOverrides(Object[] p)
       at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer)
       at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
    The above exception is thrown when I call code in an assembly via reflection.  The exception is not raised when reflection is not used.  Bellow are some additional notes.  Please help.

    1. CooperK2.ApplicationUserOverrideWebService is the namespace that contains the user class.
    2. CooperK2.ApplicationUserOverrideWebService represents a web reference called inside of the assembly that is being called via reflection.
    3. The namespace of the assembly containing the web reference is CooperK2.

All Replies

  • Tuesday, November 03, 2009 9:43 PMNo Name No Face Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Further research shows:

    1. That I can call a simple web method that calls accept nothing and return a string of "Hello World" without problems.
    2. I can call a web method that accepts strings and returns an array of obects.  It sends the email and returns a soap error.
    Please let me know if you have any ideas of how to address what is going on in my situation.