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

edhalsim
Posts: 3
Joined: Thu Dec 10, 2020 2:18 pm

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

Postby edhalsim » Fri Dec 11, 2020 12:42 pm

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.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

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

Postby JS-Support @Userware » Mon Dec 21, 2020 5:06 am

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

edhalsim
Posts: 3
Joined: Thu Dec 10, 2020 2:18 pm

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

Postby edhalsim » Mon Dec 21, 2020 8:08 am

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.


Return to “General Discussion and Other”

Who is online

Users browsing this forum: No registered users and 5 guests