Best Choice for a Reliable Self-Service Server: WCF and ASP.NET Web Api

We currently have a .NET 4 application consisting of a Windows service running in the background and local or remote clients (usually only 1-3).

Clients have a WPF GUI and need some data from a Windows service. Therefore, we use WCF with a NamedPipe binding for the local client and NetTcp binding for the remote clients. This works, but we often have problems with endpoints that are inaccessible (the channel is defective or not found, etc.). We are already trying to rebuild the failed connections, but it seems they are quite fragile ...

Now enter Web Api: it looks like the HTTP-based stack can be more reliable (no channels, no endpoints can be hosted on a Windows service by themselves). It seems that there are no problems with broken channels, because each request is processed individually. Therefore, if something fails, you simply repeat the request. (And we have experience with ASP.NET MVC from other applications, so this is not new to us).

Now we think that might be our best choice. Is it better to "consolidate" the existing WCF service (one service interface with about 15 operations) or move the interface to Web Api and run it as HTTP requests (with JSON data)? Performance is not our main concern ...

Any ideas? Hartmouth

+5
source
1

WCF (SOAP) WPF, -API. . -, , , -API, RESTful/HTTP/hypermedia. , , , HTTP, -, JavaScript-, "" ( ). , WPF-, , , .

, /, . , . IIS WAS , HTTP. . , . TCP-, HTTP wsHTTP . ​​ , web api, .

+4

All Articles