Page 1 of 1

[SOLVED] Hi! Anyone using OpenSilver to talk to a WCF service?

Posted: Fri Dec 11, 2020 12:42 pm
by edhalsim
I'm converting my Silverlight app. to OpenSilver. Looking at:
http://doc.opensilver.net/documentation ... silver-wcf
They appear to only use the synchronous method calls. I know originally Silverlight only support asynchronous. I tried using synchronous calls and when I run the project in the Browser it seems to fail, but when I run it in the Simulator, it works fine.

Thoughts? Thanks.
- Ed.

Re: Hi! Anyone using OpenSilver to talk to a WCF service?

Posted: Mon Dec 21, 2020 5:06 am
by JS-Support @Userware
Hi

Most OpenSilver projects use WCF.

3 kinds of calls are supported:
- Synchronous
- Asynchronous using async/await
- Asynchronous using Completed event

Please feel free to share a test solution to reproduce the issue where it works in the Simulator but not the browser.

Thanks!
JS-Support

Re: Hi! Anyone using OpenSilver to talk to a WCF service?

Posted: Mon Dec 21, 2020 8:08 am
by edhalsim
Hi,

Thanks for your reply. I managed to get this working using asynchronous calls. The issue was I couldn't get the system to tell me why it was crashing (I was only receiving a generic error message). Turns out I was using inheritance and had to let the WCF service know that a sub-class was a ServiceKnownType.