I have a c# project that exposes services via WebApi and also via WCF. It works under IIS.
Now I need to offer it as self host solution.
I cannot find documentation about Owin and how to expose WCF services.
Does OWin support WCF?
I think the question should be the other way around. Does WCF support OWIN?
As I understand, OWIN offers the infrastructure needed to abstract away the web server. However, whatever framework you want to use on it must have an OWIN implementation, which I think WCF does not.
Nonetheless, you can still offer a self hosted application using OWIN or WebApi SelfHost for WebApi combining with a Self Hosted solution for the WCF as described in the documentation for WCF -> http://msdn.microsoft.com/en-us/library/ee939340.aspx
WCF is not supported on OWIN at this point of time. Owin.org > Projects has information on the supported frameworks on OWIN.
Related
Initially when I built an application, there was only a requirement to expose an endpoint using WCF. Now, there is a requirement to expose another endpoint using REST therefore I have used .Net Web Api to do so. The WCF endpoint is hosted in a Windows service therefore I have hosted the Web Api endpoint in the same service. Are there any issues in doing so? Any performance considerations? After some exhaustive searching, I couldn't find any substancial information on the topic.
Are there any issues in doing so?
It may be better to expose the rest API via WCF using webHttpBinding rather than introduce WebAPI into the mix. I'm not aware of any problems this would cause per se, but in terms of solution simplicity I think it makes more sense to take advantage of WCF's multiple-endpoints-to-one-service-contract mapping capability.
I did consider this but I've read a lot of bad reviews about using WCF
to expose RESTful endpoints. Moreover, it appears Web Api is the
preferred technology as mentioned here:
WCF vs ASP.NET Web API
Agreed. If you were starting from scratch then I wouldn't hesitate recommending WebAPI over WCF (actually I would recommend using Nancyfx over WebApi any day of the week).
You can expose your service as HTTP with about 10 minutes work using WCF, assuming you wish to expose the same operations as are currently defined on your service contract, as you have already have the soap endpoint.
Plus you will end up with a simpler solution without the considerable bloat of asp.net/owin.
I have an old SOAP api that uses an ASMX endpoint, will Azure API Management be able to recognize and interface with it?
There are more people interested in this feature: feedback.azure.com. This is currently not supported however.
Support for pass-through SOAP endpoints was added recently: https://azure.microsoft.com/en-us/updates/general-availibility-azure-api-management-soap-pass-through/
SOAP-to-REST scenarios are also possible using policies: https://blogs.msdn.microsoft.com/apimanagement/2016/12/14/soap-to-rest/
Is it possible to use a self hosted signalR server with an MVC(4) application such that it is totally seperate from the signalR server?
I tried Tim and Patrick's beautifully executed SignalR intro tutorial, and was wondering if I could try that? And even if I could, would that offer any performance advantages over an integrated service as is metioned in the tutorial.
It is absolutely possible to self-host a SignalR 2.0 server with OWIN and accessing this server from within any Website (which may be a MVC application). The only thing you need is to enable CORS (app.UseCors(CorsOptions.AllowAll); in your Startup file of the Owin Host) since it's not on the same domain as your Website. Obviously you can't use SignalR within the MVC application itself this way (e.g. to publish messages).
I'm using a self-hosted ASP.NET Web API 2 and SignalR 2 server with OWIN to serve data to clients. You can find an example server using this scenario here. Tho advantage in this approach is to have your views & styles sepparated from your data and business logic. Making everything very easy to cache and scale.
I am developing a WCF service to host windows workflow under AppFabric and want to use IoC. I found a nice extension for Ninject (ninject.extensions.wf). Unfortunately, I can't find how to configure WCF service configuration file to have it working. I searched for an complete example with the extension but found nothing. On official wiki page (and related posts from owners), the partial example is not clear for me and I am confused what settings I have to have in my project. It will be great help if somebody can share their experience posting an example with WCF service which uses the extension or at least WCF web.config settings.
I'm looking for a way to secure my WCF service using http and simple username-password authentication, without using certificates.
The service is consumed by an Android device so I can't use the .NET Proxy generated classes.
I've read about basic HTTP authentication but haven't found an easy way to implement this method.
Have you tried using the MSDN custom Username/Password validator for WCF? It relies on the serviceCredentials configuration and implementing a UsernamePasswordValidator.
I've found ASP.NET Web API, seems like a better solution for REST-based Services than WCF.