Calling DataPortal from a Queue Handler

Calling DataPortal from a Queue Handler

Old forum URL: forums.lhotka.net/forums/t/12874.aspx


jteneglio posted on Wednesday, April 29, 2015

Using Azure Service Bus Queue, when I receive a message that says run this task the Application tries to to run a DataPortal.Execute (command) 

In the Queue handler I setup the dataportal

ApplicationContext.DataPortalProxy = typeof(Csla.DataPortalClient.WcfProxy).AssemblyQualifiedName; ApplicationContext.DataPortalUrlString = "http://127.0.0.1:81/MobileDataPortal.svc"

When I execute the DataPortal.Execute I get 

 {"Content Type application/soap+xml; charset=utf-8 was not supported by service http://127.0.0.1:81/MobileDataPortal.svc.  The client and service bindings may be mismatched."}

 

The Server DataPortal is running and working on that URL and it is using basicHttpBinding, also when I use the WinRT app to connect to this URL, it works.

 

What Am I missing?

JonnyBee replied on Thursday, April 30, 2015

Well, if you are using the MobileDataPortal then you are also using the MobileFormatter and this is not compatible with WcfPortal (or WCF). 

I believe you must change configuration to use MobileProxy rather than WcfProcy. 

jteneglio replied on Thursday, April 30, 2015

Yup that worked, thanks

Copyright (c) Marimer LLC