Signalr as WCF Service for various clients - wcf

Need an advise on following.
What is the best option to host Signalr, could it be hosted as a WCF service?
This SignalR will be consumed by clients like web application (MVC4) and ios applications.
Thanks,

The answer is No as far as I know. You cannot host SignalR hubs as a WCF service. As alternative to hosting in a ASP.NET website, you can choose self hosting approach as explained here.
On the other hand, SignalR has client APIs for both ASP.NET and iOS/OSX. The easiest solution (and my recommendation) would be direct hub usage via the client API.
If you insist on to open a WCF endpoint to manage SignalR hubs, you can reach SignalR IHubContext from WCF by using GlobalHost.ConnectionManager.GetHubContext<YourHub>().
Only requirement here is that your WCF service must be hosted on the same web application with your SignalR hub. External WCF services from different service applications cannot reach your hubcontext.

Related

WCF Rest Service Reference in ASP.net core 3.1 API

I've created a WCF Restful service(Framework 4.7.2) and hosted the service in IIS sever. I would like to add the service on a ASP.net core 3.1 Api. It does fails while adding it via connected service. The wcf service has endpoint with webhttpbinding.error
Any help would be appreciated..
Core does not support webhttpbinding, wcf only supports BasicHttpBinding, CustomBinding, NetHttpBinding, NetTcpBinding:
So there are two current solutions:
Modify the binding of the server, do not use webhttpbinding.
The client continues to use the .net framework.
Feel free to let me know if the problem persists.

Azure API App service hosting wcf service

I have created a wcf service and self hosted it. I want to push it over the azure cloud as API APP service and not a cloud service? Please guide.
I actually something similar: hosting REST endpoints and a WCF endpoint in an Azure deployed API App
There was nothing special to consider. Just created the WCF within my solution, configured basicHttpBinding correctly to work with https.
Let me know where exactly you're struggling.

securing WCF service with OAuth 2.0

I followed the example in the article http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server
this works great for WEB API, how would I secure a WCF service the same way? I would like to have it communicate to the authorization server coded with OWIN and WEB API, is there a WCF binding that will communicate with it? or any other way to do this?

Use WCF Service or ASP.NET Web api for biometric device?

I have a web application(HRMS) in asp.net MVC4 and a Windows Form (later on converted in windows service) connected to a biometric device. So question is should I use WCF Service or asp.net web api to send attendance data?
Thanks in advance
Go for ASP.NET Web API.
Use WCF to create reliable, secure web services that accessible over a
variety of transports. Use ASP.NET Web API to create HTTP-based
services that are accessible from a wide variety of clients. Use
ASP.NET Web API if you are creating and designing new REST-style
services. Although WCF provides some support for writing REST-style
services, the support for REST in ASP.NET Web API is more complete and
all future REST feature improvements will be made in ASP.NET Web API. If you have an existing WCF service and you want to expose
additional REST endpoints, use WCF and the WebHttpBinding.
Its better to stay with WebAPI as it looks to be more appropriate for building further real RESTfull service development. WCF was originally created to enable SOAP-based services. For simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API should be good choice.

How to communicate with clients' WCF services (behind firewall) from internet asp.net mvc app?

Can an internet Asp.net MVC app communicate with client companies' WCF services (hosted on their IIS behind firewall) using SignalR? Otherwise what other .Net technology would help here? Or any third party solutions exists?
There's shouldn't be any problem with communicating a server behind firewalls, as long as the appropriate rules are allowed. Just becareful when applying rules as SignalR has multiple fallback mechanism to support different browsers.