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
3
votes
2 answers

WCF Service host closing is blocked by open sessions and setting receiveTimeout doesn't help

I need my WAS hosted service (PerCall, Concurrency.Multiple) to shutdown/recycle gracefully but any inactive (but open) client proxies will block the service from shuttingdown gracefully. I had expected the receiveTimout to kick in and toss out the…
Henrik Cooke
  • 775
  • 5
  • 8
3
votes
4 answers

WCF slow ServiceHost.Open() call

This is a similar question as this one: Win32Exception @ ServiceHost.Open() for WCF service. I have a machine that is very slow on the ServiceHost.Open call below. It consistently takes 7 seconds or so to open the service, every time. This machine…
dcp
  • 54,410
  • 22
  • 144
  • 164
3
votes
1 answer

ServiceHost Efficiency

Hoping you could help me please.. I am using WCF in my program. Part of this includes using ServiceHost in a self-service type scenario using a netNamedTypeBinding. When I include ServiceHost in my class and then instantiate that class…
rostrond
  • 33
  • 4
3
votes
2 answers

WCF listen base address anyip

i want my servicehost to have the base address of any IP so i tried this new ServiceHost(typeof(LoggingController),new Uri("0.0.0.0")); and it gives me invalid URI format any one knows how should i write this ? well i tried to access it from…
Stacker
  • 8,157
  • 18
  • 73
  • 135
3
votes
1 answer

Contract Type is Not Attributed with ServiceContractAttribute

When trying to create an application that uses dynamic ports, instead of a hard-coded port value, I ran across this error: System.InvalidOperationException: The contract type MLITS.Pulse.Pulse is not attributed with ServiceContractAttribute. In…
Jason W
  • 682
  • 1
  • 7
  • 18
3
votes
0 answers

ServiceHost Open Delay

Since updating my workstation with windows 7 ultimate (from XP), I experience a delay of about 40 seconds to after calling Open() on an instantiated ServiceHost. When I run the exe with the same config on the host windows server it opens…
Sean M
  • 616
  • 6
  • 16
3
votes
1 answer

High CPU on an idle ServiceHost connected to Azure Service Bus Relay

My company is using an Azure Service Bus Relay to aggregate summaries of sensitive data into an Azure-hosted application. We have noticed on a pre-production server that after the first few requests are processed CPU utilization by the process…
3
votes
2 answers

Along with my hosted Windows service's installer, is it possible to set the recovery options when errors occur?

I'm following along with http://msdn.microsoft.com/en-us/library/bb332338.aspx to host my service as a Windows service. It installs just fine, but I would like to actually set the recovery options to "Restart the Service" on a "First failure",…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
3
votes
4 answers

Getting a WcfSvcHost.exe error when I try to run my WCF service

When I try to run my wcf in Visual Studio 2012 I get the following error Usage: WcfSvcHost.exe /service: /config: [/client:][/clientArgs:] I've read a few…
FaithN
  • 213
  • 1
  • 3
  • 7
3
votes
3 answers

Creating a WCF ServiceHost object takes three to four minutes on some PCs

I have created a WCF service which does not use the app.config to configure itself. However, it takes three to four minutes on some PCs to construct the ServiceHost object. Thinking there was something wrong with my service, I constructed a simple…
Stephen Drew
  • 1,415
  • 19
  • 31
3
votes
1 answer

Win32Exception @ ServiceHost.Open() for WCF service

I am working on writing BDD specifications for a broad set of WCF service infrastructure I am writing. I have noticed that each specification I write that involves a call to ServiceHost.Open(), that line takes a good 2 - 6 seconds to execute (the…
jrista
  • 32,447
  • 15
  • 90
  • 130
3
votes
1 answer

WCF - ValidateUserNamePasswordCore() method in custom UserNameSecurityTokenAuthenticator not called

I have defined an own ServiceCredentials provider: class PasswordServiceCredentials : ServiceCredentials { } That provider generates a custom SecurityTokenManager in CreateSecurityTokenManager() method when I start my ServiceHost: public override…
user432219
2
votes
3 answers

WCF Multiple channels for one service instance

This is my code for server application: [ServiceContract] public interface IFirst { [OperationContract] void First(); } [ServiceContract] public interface ISecond { [OperationContract] void…
user1094613
  • 71
  • 1
  • 4
2
votes
1 answer

What is the proper way to Host dozens of WCF Services in a single Windows Service?

I've been tasked with moving over dozens of WCF Services to a single Windows Service. I've created a Windows Service using the Windows Service template and added the the following code to ServiceHostController: public partial class…
5StringRyan
  • 3,604
  • 5
  • 46
  • 69
2
votes
2 answers

Programatically discover a ServiceHost's Service Type

G'day, I've tried searching MSDN and here, but I don't think I can do this: Given a reference to a ServiceHost, is it possible to discover the type of the host it is executing? Something like ServiceHost host = new…
Spence
  • 28,526
  • 15
  • 68
  • 103
1 2
3
10 11