0

I am not sure did anyone had this type of problem. Can you please give some clues with the approach i am trying in WCF.

I have say 100 dlls registered in server GAC. When my WCF client invokes with the name of the dll, WCF service should look in to the GAC using reflection and create instance for that and send it back to the client. I dont know anything about 100 dlls and all those are POCO objets.

I tried and and was getting errors at serialization of datacotract. Below is my datacontract.

[DataContract]

public class RDSContract
{
    private Type _oType;
    private Object _oObject;
    private string _strOutput;

    [DataMember]
    public Type TypeProp { get; set; }

    [DataMember]
    public Object ObjectProp { get; set; }

    [DataMember]
    public string StrOutput { get { return _strOutput + " test"; } set { _strOutput = value; } }
}
Ranga
  • 1
  • 2
  • Registering 100 dlls in the GAC is a bad practice. The GAC is not meant to be the 21st Century of the Windows **System32** folder. There are special reasons and implications for placing items in the GAC, most of which won't apply to the majority of apps we coders face. The only time I did was when I was making a plugin system with CAS with untrusted plugins. [tell me more](https://stackoverflow.com/a/498367/585968) –  Dec 13 '17 at 01:44
  • Thank you Micky, but it is very old system, as of now i cannot change the architecture of the system to move all the dlls out of GAC. So looking for the plugin kind of stuff to make it work with the old system. – Ranga Dec 13 '17 at 14:24
  • you need to use the KnownType attribute on your DataContract class with all the types you could potentially return. – 1.618 Dec 13 '17 at 23:28

0 Answers0