Questions tagged [servicehost]

Implements the hosting object used to host a WCF service in self-hosted scenarios. Used for loading a service, configuring endpoints, applying security settings, and starting listeners to handle incoming requests.

Implements the hosting object used to host a WCF service in self-hosted scenarios. Used for loading a service, configuring endpoints, applying security settings, and starting listeners to handle incoming requests.

161 questions
0
votes
0 answers

Get ServiceHost instance from app.config

It's possible to get instance of app.config created service host? I have class A with two instances, every instance have different params, I need to host those two instances as Service Host each on different web address. Source code: public void…
user1085907
  • 1,009
  • 2
  • 16
  • 40
0
votes
1 answer

Self-hosted NetTcp service timeout error

I have a windows service which houses a WCF NetTcp host. From the client, when I start making calls to the service via tcp, they go through fine at first but then after a few minutes they all start to give the dreaded WCF timeout error which really…
Justin
  • 17,670
  • 38
  • 132
  • 201
0
votes
1 answer

Serving up WCF Services in MVC

I'm wondering if it's possible to service up WCF services via MVC. I've seen a few posts about this as it relates to RESTful services, but I'm not looking to create a RESTful service. I've also seen this topic covered as far as serving up .svc…
Doug
  • 264
  • 2
  • 10
0
votes
0 answers

WCF Winform freezes when opened by server

I've written a VSTO Outlook Add-In and am trying to open a form in a separate Winform app when the user pushes a button on the Add-In, passing an integer as argument. I'm using WCF Named Pipe Binding. The Add-In is the client and the Winform app is…
0
votes
2 answers

Custom ServiceHost in wcf configuration file?

i wonder if there is a way to specifiy a custom ServiceHost (i.e. a ServiceHost derived class) in configuration? thanks
Joachim Kerschbaumer
  • 9,695
  • 7
  • 49
  • 84
0
votes
0 answers

Pass parameters while creating a WCF Service Host

I have a WCF service - public class DemoClass : IDemoClass { } I can successfully host this WCF Service in another managed windows service. When the main service loads I start my WCF main service like this - ServiceHost servHost = new…
sandunes90
  • 455
  • 2
  • 4
  • 22
0
votes
1 answer

Can I modify Endpoint after it is added to the servicehost?

I am trying to figure out how to get an handle on the endpoints of the service host and modify their identity. I have endpoints defined in the config file but want to modify the endpoints programmatically depending on the environment (ex:QA, UAT,…
user507040
  • 11
  • 1
0
votes
1 answer

C# RESTService with SSL/Https

I am trying to secure up my RESTService but when i enable https i get an ERR_CONNECTION_RESET message! Here is my code to generate the cert: public void generateCert() { String certSerial =…
Flo
  • 1,179
  • 3
  • 15
  • 43
0
votes
1 answer

WCF : Service does not work for multiple clients

I have a self-hosted WCF Service with a peer-to-peer binding. I'm using a DuplexChannel for getting responses. The callback itself is working. I'm saving the callbacks in a static Dictionary. When a client logs in, the callback is added to the…
Merve Sahin
  • 1,008
  • 2
  • 14
  • 26
0
votes
0 answers

WCF Client always faults after a few seconds

I have a WCF service that works fine with an app.config file. I decided to move this app.config stuff to the code so I have better control. I tried the following: string localIP = GetLocalIP(); int PrimaryPort = 9900; Uri PrimaryUri = new…
user3685285
  • 6,066
  • 13
  • 54
  • 95
0
votes
0 answers

WCF: How to stop service when host closed?

I am trying to add my custom (not WCF) service to my WCF. It is hosting in Windows Service and in IIS. I added call serviceHost = new ServiceHost(typeof(MyService)); ... // ok, works. When win service stopping it calls if (serviceHost != null &&…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
0
votes
1 answer

C# passing typeof(x) to a function ( e.g like lHost = new ServiceHost( typeof(Tester1) ); )

I'm using C#, .Net Framework 4.5.1 in SharpDevelop. Is there a way to create a function that accepts "typeof(ISomeInterface)" and "typeof(SomeClass)" as parameters? Situation: I'm building an application, that is supposed to host several…
0
votes
1 answer

Accessing ServiceHost in WCF from another Servicehost C#

I have 2 contracts hosted in two servicehosts i need to have a singleton object in the first contract so when the other servicehost try to create an object from that class it just retrieve the same object from the first servicehost, which might…
Stacker
  • 8,157
  • 18
  • 73
  • 135
0
votes
1 answer

How to modify WCF service configuration if services hosted on IIS?

I have WCF service (NET 4) hosted on IIS. It configured via web.config. I just want to make some little changes at existsing configuration in runtime. It seems using custom ServiceHostFactory/ServiceHost force me to duplicate all settings in code.…
garry
  • 25
  • 5
0
votes
1 answer

Communication between WCF (ServiceHost) and HTML (JQuery)

I am want to program a simple "Hello world" example for a communication between WCF service and an html page. To program the WCF server I use the code below: namespace ConsoleHelloWorldServiceClient { class Program { …
lla
  • 81
  • 3