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

Why does WCF ServiceHost stay open once out of scope?

I was just tidying up some WCF (self-hosted) code of mine and realised that my ServiceHost object was going out of scope after it had been initially setup, but I could still connect to it. public void StartMyService() { var host = new…
HAdes
  • 16,713
  • 22
  • 58
  • 74
2
votes
2 answers

WCF Service running in ServiceHost (Console App)

I am attempting to wrap a WCF service that was previously running in an .asmx service in the taskbar into a Console App. Here is the code for wrapping up the WCF Service: class Program { static void Main(string[] args) { Uri uri =…
J Thorpe
  • 67
  • 2
  • 7
2
votes
1 answer

WCF service in Azure worker role slow on first request after being idle

We have an Azure worker role that exposes a RESTful WCF service (using System.ServiceModel.Web) through a ServiceHost. The performance is irreproachable on massive traffic, but it seems like the response time is significantly higher (more than five…
2
votes
2 answers

Can a WCF Service access other ServiceHosts running in the same process?

I would like to create a service whose job is to monitor other services that are running within the same process, and then report basic information like health or service dependencies. I'm having trouble figuring out the best way for my monitoring…
mclark1129
  • 7,532
  • 5
  • 48
  • 84
1
vote
0 answers

How do you capture and store a MeshEntry/P2P Endpoint from a CustomPeerResolverService?

Is it possible to capture and store a MeshEntry much in the same way as you can capture a client callback channel via OperationContext.Current.GetCallbackChannel<>? I can see the MeshEntrys listed in the CustomPeerResolverService but im not sure if…
Christopher Leach
  • 568
  • 1
  • 5
  • 16
1
vote
3 answers

WCF:: ServiceHost & AddServiceEndpoint: Are Arguments types reversed?

While I am trying to learn WCF, and it seems straight-forward enough, I came through an odd situation...at least it seems odd to me. Why is it that the ServiceHost ctor takes a concrete class, and the AddServiceEndpoint takes the Interface, and not…
Futurist
  • 97
  • 3
  • 6
1
vote
1 answer

WCF: HTTP 400 Bad Request on self hosted service

I have this interface: [ServiceContract] public interface ILocationService { [OperationContract] bool RegisterForNotification(string name, string uri); [OperationContract] bool…
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
1
vote
1 answer

What is the default WebHost for Blazor Server?

I have a blazor server application to which I want to add a WCF NetTcp listening port. The regular Blazor Server Program.cs file is as follows: var builder =…
Marcin
  • 131
  • 6
1
vote
1 answer

wcf duplex service freezes on callback call

Service contract: [ServiceContract(CallbackContract = typeof(IClientCallBackChannel), SessionMode = SessionMode.Required)] public interface IServerService { [OperationContract(IsOneWay = true)] void foo(); } Client contract: public…
jacob
  • 1,397
  • 1
  • 26
  • 53
1
vote
1 answer

Add EvenLogging to an IHost container

I’m creating a console app and have recently started adding custom services to the IHost container so I can simply pass the IHost to any number of factory classes and have everything thing I need to configure them. But I’ve gotten stuck when it…
DooHickey
  • 85
  • 10
1
vote
2 answers

VersionOne Bugzilla Integration "Validation Failed"

I am trying to set up the VersionOne-Bugzilla integration tool (https://community.versionone.com/VersionOne_Connect/Supported_Integrations/VersionOne_Integration_for_Bugzilla_5.0_and_Above), and I am hitting one problem when trying to set up the…
pi905
  • 25
  • 8
1
vote
1 answer

WCF local machine ServiceHost and Administrator Privileges

Is there way to run self host a WCF service with ServiceHost on local user (no administrator privileges)? It needs only to be on the local computer. I'm working on aplication which in future will be installed on multiple desktops, but currently it…
Andrew
  • 147
  • 3
  • 8
1
vote
2 answers

How can I bypass Operation Contract limitation of a WCF Service when calling "Update Service Reference" in VS 2008

I am having trouble with a single Wcf Service that we have in an application. It has about 150 [OperactionContract] within it. I can now no longer Update Service Reference within Visual Studio 2008. I receive all kinds of strange errors, varying…
Jason Stevenson
  • 4,004
  • 3
  • 29
  • 49
1
vote
0 answers

Adding a WCF IPC service to an existing App that access an SQLite DB through EntityFrameworkCore

I'm looking for some help. I have a Mono application for Mac, developed in VS for Mac, using the currently latest updates in the VS for Mac, which include Mono Framework MDK 5.16.0.221. The app is targeting .NET Framework 4.7.1 The app accesses an…
Ivan
  • 11
  • 3
1
vote
1 answer

Windows netsh "+" wildcard not working for ServiceHost

Disclaimer: Similar to this question, this one is specific to the most voted comment from the answer I use a ServiceHost object to create a HTTP service: http://{IP}:80/myService My application runs from a non-admin account (and this must be kept…
Sergio Basurco
  • 3,488
  • 2
  • 22
  • 40