self-hosting

WCF self-hosted service with transport security (Authentication failed because the remote party has closed the transport stream.)

Hi, I have a self-hosted service that I want to add transport security to. I've set WSHttpBinding.SecurityMode to Transport and the ClientCredentialType to HttpClientCredentialType.None. I've created a certificate and set it to my host with ServiceHost.Credentials.ServiceCertificate.SetCertificate() I've also registered it using netsh h...

Want to host WCF Webservice as Windows Service as against to Hosting in IIS

I want to expose few web services but thinking of hosting those as Windows Service as against hosting in IIS. Is it a good practice? If yes? How do I make it secured? I want to authenticate the users who are accessing it (against our custom security database and also want to make sure that the request is originating from our busines...

Run WCF ServiceHost with multiple contracts

Running a ServiceHost with a single contract is working fine like this: servicehost = new ServiceHost(typeof(MyService1)); servicehost.AddServiceEndpoint(typeof(IMyService1), new NetTcpBinding(), "net.tcp://127.0.0.1:800/MyApp/MyService1"); servicehost.Open(); Now I'd like to add a second (3rd, 4th, ...) contract. My first guess would...

Does a WCF self hosted service handle more or less load than the IIS hosted option?

Does the hosting option affects the amount of requests a WCF service can handle? ...

Connecting Silverlight app to Self hosted WCF service

I've created a WCF service that is running on 192.168.0.199:87. The service works without a issue. However when I create a silverlight app to consume this service on my dev pc in VS I am getting the crossdomain problem. How am I going to solve this. The service is not a IIS WCF service. I also can't host the WCF service and the silverlig...

ServiceHost's conflict on address when unit tested

I have a small WCF hosting engine that I am writing that will dynamically create ServiceHosts based on the .config file. The general idea is to allow us to remove existing services, as well as add new services, at runtime without having to bring all of our services offline. I ran into a problem unit testing that indicates this may not b...

WCF Service Self Hosting Trouble

I'm trying to host a WCF Service inside a Windows Service which I am starting through a console app. Each service is its own project as is the console app. I've copied the app.config from the WCF Service library into the app.config of the console app, but I keep getting "Service has zero application endpoints...". I've read in a few p...

Self-Hosting WCF for AJAX Client

Hi, I'm trying to self-host a WCF web service and provide a HTTP endpoint with ajax support. Pretty much everything I've found about WCF and AJAX are talking about IIS, which I don't want to use. I've build a simple Console App to host the service. My service only have a single method: [ServiceContract] interface IMyService { [Op...

Synchronization problems with Monitor class in WCF service

I have a self-hosted WCF service and I'm having the following problem: 15 minutes after creating the instance of the service TryEnter calls in operation contract methods constantly return false, but the TryEnter calls in Main function, which also uses synchronization via Monitor class, return true. Here's the description of my app and t...

What are the benefits for several servicehosts? Does one ServiceHost support several simultaneous connections on one endpoint?

I'm thinking of self-hosting my WCF service instead of using IIS. A big question for me is whether I need to instantiate multiple servicehosts as IIS does or one wil be enough. Do muptiple servicehosts give any benefit except security reasons dut to isolation? Can one servicehost serve multiple connections on one endpoint simultaneou...

How Expensive are ???-Hosted WCF Services?

A co-worker and I are having a discussion about WFC services when the topic of "cost" comes up. The question is this: Given that an IIS-hosted WCF service and a Windows-Service-hosted WCF service do the exact same thing, which service will be more "expensive" with regard to memory and CPU cycles if they both are accepting the same load...

Can WCF RIA Services be self hosted?

I know WCF can be self hosted. how about WCF RIA Services? Thanks! ...

Connecting to a self hosted WCF service from a Flex application - policy issues

Hello, I am trying to accomplish the following: I wrote a Flex application that is trying to connect to a WCF service hosted on the clients computer. I also wrote a windows forms application for the client to run. This application exposes a self-hosted WCF service that the Flex application is supposed to connect to. This works fine i...

WCF Self Host Service - Endpoints in C#

My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues: All the documentation talks about endpoints being created automatically for each base address if they are not found in a config file. This doesn't seem to be the case for...

Self hosted WCF ServiceHost/WebServiceHost Concurrency/Peformance Design Options (.NET 3.5)

So I'll be providing a few functions via a self hosted (in a WindowsService) WebServiceHost (not sure how to process HTTP GET/POST with ServiceHost), one of which may be called a large amount of the time. This function will also rely on a connection in the appdomain (hosted by the WindowsService so it can stay alive over multiple request...

Workflow Service host not publishing Metadata.

Still hacking away with extreme persistence at WF services hosted outside of IIS. I'm now having issues with my WF service publishing metadata. Can someone take a look at my code and see what step I'm missing? The few tutorials that I've stumbled across for my scenario make it look so easy, and I know it is. I'm just missing something ri...

WCF Web/ServiceHost - Singletons and initialisation

I have some Service class which is defined as InstanceContextMode.Single, and is well known in the hosting application. (The host creates an instance, and passes that to the WebServiceHost) Hosting app:WebServiceHost host = null; SomeService serviceInstance = new SomeService("text", "more text"); host = new WebServiceHost(serviceInstanc...

RIA DomainService Hosting

i have an application, in which i have an EntityModel. i have a DomainService which talks to this EntityModel. i am using simple LinqToEntitiesDomainService for this application, not .svc extension files. On Silverlight (client), i am able to get/put the data through this service. Now my question is: I want to see the wsdl of hosted RIA...

Self-hosted WCF service has HttpContext.Current == null despite the fact that AspnetCompability allowed

I'm using self-hosted (programmatically hosted) WCF-service in Web Application. I placed the [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] attribute to the SampleService class and placed <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false"/> e...

WCF duplex communication

I need to re-write an existing client-server application. The existing application communicate using socket, I have to convert it into WCF. At server side I need to Monitor connected clients Validate client request Broadcast live data (comming from diff source). Listen to client and respond to it At client end I need to Receive...