wcf - Formatter exception deserializing Agatha request -
I am scratching my head for a few more days from this one and I hope to provide some insight First of all, the exception ...
An exception was returned by an activity: while trying to deserialize the message, the formatter thrown an exception: when trying to deserialize the parameter Error was InnerException Message 'error 1 was in line 8 position. Element 'http://schemas.datacontract.org/2004/07/Agatha.Common.Request' is a type of data that is a map for the name 'http: // schemas .datacontract.org / 2004/07 / Mycompany.MayProod Services. Contacts: Customers: ReadAllCustomersRequest 'Deserializer has no knowledge of any kind that is a map for this name. Consider using DataContractResolver or add related type 'ReadAllCustomersRequest' in the list of known types - for example, by using the KnownTypeAttribute attribute or by passing the DataContractSerializer into the list of known types. Please see InnerException for more information.
OK, that's fair. It seems that the serializer does not know that my type (ReadAllCustomersRequest) has been received by Agatha's request. Strange, as Agatha should deal with it during the config. My service level configuration looks like this ...
// Note: A Unity Container (Re-Container Variable) is built elsewhere. Var agathaServiceConfiguration = New ServiceLayer configuration (new container (container)); AgathaServiceConfiguration.AddRequestHandlerAssembly (typeof (ReadAllCustomersHandler) .asembly); AgathaServiceConfiguration.AddRequestAndResponseAssembly (typeof (ReadAllCustomersRequest) .asembly); AgathaServiceConfiguration.Initialize ();
Note that my handler types are in the same assembly as this code (MyCompany.MyProduct.Services). My request and response type, however, are in a separate assembly (MyCompany.MyProduct.Services.Contracts). No big deal. After all, I originally copied Brian's "Hello World" (and the examples in the Agatha source were referred).
The thing is that it all works well. No errors ... Run locally (Win7 / VS2010 / Cassini) If I push server-side shabang to the IIS 7.5 site, then I start getting exceptions above. The same compiled assemblies have the same file configuration different results oh, IIS ... how do I love you
I have a great deal of doubt that this is a great problem, as I said, it runs just fine at the local level. I'm just thinking that someone has a clue as to why I fail to leave it on a remote server, I'm missing a lot, I'm very clear.
Oh, and what's this, the IIS 7.5 site is hosting non-Agatha (Buo!) Services. In my end, the calculation of the end points is just fine, too oh, and Elmah any server- The side does not record unless I send a request to the client, everything is normal.
So, about my deployment some , but it got me stumped. Any ideas?
My deployment was outstanding and my Global.asax was not posted correctly. Breath ...
Comments
Post a Comment