WCF http activation without IIS - wcf

Is it possible to enable HTTP components for WCF without installing IIS. When i try to enable the HTTP components on windows server 2008 it forces me to enable the web server components.
Is there a workaround by not installing webserver.
(any solution other than self hosting or windows service)
thanks
Ben

WCF services can be hosted in any managed .NET application, not only IIS. You can either host it inside a windows service, or create a standard .NET executable to host the service (self-hosting). You can configure your end point to http eventhough the WCF is hosted outside IIS.
Check this article for more insight:
Hosting and Consuming WCF Services

Related

What is the purpose of the WCF Activation feature?

I create a WCF service in Visual Studio 2013 and publish it to IIS. I can the add a service reference in another project and consume methods on the service. When I go to the IIS Server Manager I see WCF Activation and its two sub-items (HTTP Activation and Non-HTTP Activation) unchecked.
What are these features and how does my WCF site work without them enabled? I've looked around the web quite a bit and haven't found any definitive answers. Thanks.
Before IIS 7.0 you could only host HTTP services on IIS. If you wanted to use non-HTTP protocols (e.g. net.tcp) you had to self-host. Microsoft introduced the Windows Process Activation Service (WAS) to allow common hosting within IIS regardless of the communications protocol being used.
In practical terms, one of the neat features of this is that you can host your net.tcp WCF services on IIS and they will be dynamically activated once traffic starts arriving. Previously you had to have your service running (console app, Windows Service or whatever) before messages began arriving.
Further details can be found in this MSDN article.
If you are just running WCF services using the HTTP protocol and have those services hosted in a IIS web site, the default configuration will just work.

Calling a net.tcp wcf service from Silverlight - in an external facing web site?

I have an external (public) website developed in Silverlight. The Silverlight app currently calls http based wcf services hosted in IIS.
I am now having to call a wcf service with net.tcp binding hosted in a different app server. I have the net.tcp wcf service hosted in a windows service on port range 4502-4530 and with an interface to expose clientaccesspolicy.xml file as part of the service. I am able to invoke this service from my Silverlight app in the web server. I want the SL app to make direct call to net.tcp, rather than routing the call to it from another http based service.
Question is will this work without any issues when exposed over internet.
Client browser --> IIS webserver with Silverlight website --> App Server with wcf service on net.tcp.
I am assuming in this case, from XAP SL would try to make direct call to the app server service using net.tcp ?
The communication between the web server and app server could be opened up for ports 4502-4535. But I am wondering what about the client. Does this setup require the ports to be available even in the clients machine (with browser)?
Any insight is much helpful.
Thanks.
Take a look at http://support.microsoft.com/kb/2425652; there is sample code included as well! If you setup clientaccesspolicy.xml correctly; it should work as long as clients can access your TCP server.
If your clients are behind some firewall which is blocking your server's ports; they may face connectivity issues!

Hosting of ajax enabled wcf service in IIS 7

I have deployed an asp.net mvc application in IIS, The application has been deployed successfully and working fine. I Used ajax enabled wcf service in my application, the problem is when I want to use the method of the service. I get the not found error, but when I browse to see the service it gives the page saying that your service is hosted, I cannot access the methods of the deployed ajax enabled service.. Kindly help me out..
Things to be noticed..
My services are hosted as a file with the extension of .svc
I deployed the application on windows server 2008 r2 64 bit, but I configured the application pool to work in 32 bit.
Services are accessible, but the methods of service are not allowed.
Thanks in advance.
Ahsan Nomani.

Does IIS work with http-only WCF services?

I'm not a WCF expert, so please don't laugh at me.
I need to write a WCF service that receives data through TCP endpoint, not HTTP. Can I still deploy it to IIS or Azure and take advantage of all cool stuff that's baked in (load distribution, etc.)?
Depends on the version of IIS.
IIS v6 supports HTTP only
with IIS v7, you also get WAS (Windows Process Activation Services) which then also supports TCP and other protocol when hosted in IIS
See:
How to: Host a WCF Services in IIS
Setting up a netTcpBinding enabled service in IIS 7

WCF service Hosting Servers

I created the service using WCF. As i know i can host in IIS.
Is it possible to host WCF all servers (like apache).?
Please provide the list of server where can host the WCF service and where its best to host service?
You can host your WCF services:
in IIS/WAS (preferably IIS 7.x or newer); IIS 5.1 and IIS 6.0 only support HTTP bindings, while IIS 7.x through WAS supports all WCF bindings
or you can self-host in any managed application (NT Service, console app, WPF app - whatever); supports all WCF bindings and gives you the ultimate control over how your services are hosted / available
Those are your options.
Read:
MSDN : Hosting WCF Services - with further links to hosting in IIS, WAS and self-hosting