I currently have a self-hosted WCF service running in a Windows service. I have been asked to host the WCF service in IIS 7. It seems that all of the MSDN suggestion require me to implement a wrapper class for the service instead of loading the service dll directly via a configuration file. I have already read the links Why/how to migrate self-hosted WCF service to IIS7? and WCF Service. Can't host in IIS7. Has anybody done this before? If so, can you point me in the right direction?
Related
I'm building a self-hosted service to be consumed by Silverlight. This service is not a straight Wcf service, but it uses HttpListener to implement a streaming service for Silverligt. To mkae it accessible by Silverlight, I've created another service (that is a Wcf service) to serve the clientaccesspolicy.xml file.
My problem is that once my clientaccesspolicy service is registered at http://localhost:9001 I cannot access my streaming service that is listening at http://localhost:9001/silverlightstream.
I've a couple of other Wcf services registered at http://localhost:9001/xxx which can seamlessly coexist with the clientaccesspolicy service.
What do I need to do to get the streaming service to work together with the clientaccesspolicy service?
Thanks in advance for your help.
I've answered a similar question before, I don't know how much it fits your situation, but it does look like it might help you out a little:
How can I host a Silverlight 4 application in a WPF 4 application?
In my project, I took it further and delivered the html/xap files via said self hosted service (so as not to require IIS, as IIS was a bit too much bloat for what I required).
I have a RESTFul WCF service and it needs to be deployed now. I am really confused whether to deploy in windows service or IIS 7. I need to implement SSL also so the protocol would be HTTPS. It is just a simple service consumed by client using HTTPS protocol.
Please let me know which one is better.
Your question seems to have been asked (and answered) previously.
The following link provides a good discussion:
IIS WCF service hosting vs Windows Service
If your RESTFul WCF Service needs to be accessed via http (or https) protocol, then deploy in IIS7.
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
I have found some basic information about hosting a WCF service in a Windows service, but not much. All of my experience thus far with WCF has been in Web projects. I have a few simple questions.
I have a project which creates a windows service application. I have done a right click -> add WCF Service. This creates Service1.cs and IService1.cs.
I'm wondering why no SVC file is created in this scenario? When I add services to Web projects i get an SVC file which I can navigate to and use to consume the service.
Adding the service adds some configurations to the app.config under the services element. I'm seeing a default base address of
http://localhost:8732/Design_Time_Addresses/WindowsServiceName.services/WCFServiceName/
What does this mean? It's sort of an odd looking address. Am I supposed to change it to whatever I want?
Navigating to this address in a browser results in an unable to connect message. Does the windows service itself have to be running to talk to the WCF service?
How do I go about consuming this service from another application without an svc file?
I'm taking a guess on this first one, but I'm thinking the .svc file when hosting in IIS is to tell IIS, "Hey I have a WCF service here, please handle accordingly".
The base address is as it should be and yes you can change it if I'm not mistaken.
You can't hit the WCF service unless the Windows service is running, which is one of the dangers of hosting in a Windows service, because if the service dies somehow your WCF service is offline until you get the Windows service running again.
You consume the service the same way you do any other WCF service, just using that base address to get at it.
Does anyone know how to host a WCF Data Service (or OData) inside IIS7? I'm seeing lots of articles about hosting WCF, but none specific to WCF Data Service.
Thank you very much.
Hosting a WCF Data Service in IIS is actually the default option.
Its a pretty easy 3 step process:
Create a new WebApplication project (or re-use an existing one)
Add a WCF Data Service to the project
Deploy to your IIS server
Step 3 is just the standard process for deploying a WebApplication to IIS.
A WCF Data Service is just a WCF (REST) service, with some additional out-of-the-box functionality added in.
It has a *.svc file and all - it will be hosted very much the same as a "regular" WCF REST service.
So all the articles you see about WCF REST should really apply to WCF Data Services as well - or are you experiencing some difficulties with something specifically??