I am using the following structure -
1. Process A - running a self-hosted WCF service
2. Process B - hosting process A
When simply running A - service works as expected (using app.config service's configurations).
When running B - service seem to not recognize A's service configuration.
I added the entire section from process A to process B.
How must I configure service's configurations in B's app.config?
Thanks!
Related
I'm building a WCF service that on startup (not first invocation) needs to monitor the filesystem for files to be updated. I have the service working however, I'm running into a problem where I can't get the WCF service to "warm up" on deployment and start doing its job. The only way I've been able to get the service to start is by directly poking it via one of its web methods.
I've followed the instructions in the following articles to no avail:
IIS 8 Application Initialization - warming up WCF services
http://www.codeproject.com/Articles/508713/Custom-WCF-web-service-warm-up
The only difference between what I'm doing and the samples appears to be that I'm using IISExpress. Has anyone had any success with WCF Service warm starts in IISExpress?
Dev Env: Visual Studio 2012 Sp2
We have set of WCF services running on single computer which collectively serves an WPF application which could be on same machine or on remote machine (within same network only). We need failover mechanisum so whenver any of the service crashes or hangs - we want to restart the service and initialize it by calling appropriate method.
Since we are not aware of what is the industry standard for implementing failover for WCF service - we have implemented like this way. We start main WCF service hosted in console app along with one more secondary WCF service which constantly checks health of main WCF service by calling exposed method on given endpoint. If main WCF service fails, it takes role of main WCF service and launches another secondary WCF service.
The above approach is working fine but only problem we have seen is memory since we launch services in pair and every host requires 10MB of memory.
Can anyone help me what is the industry practice for implementing failover for this kind of scenario?
I have two WCF services in a single solution (let's call it the service solution). I've deployed those services on a remote machine. I have another solution in which I consume those services by creating a reference to the services on the remote machine (let's call it the client solution). The code for both services is up to date on the remote machine (AFAIK), because I have deployed the most up to date code to it.
The issue is that in the service solution I can debug one of the services but not the other. The one that fails gives this error when I put a breakpoint on it.
The breakpoint will not currently be hit. The source code is different from the original version.
The question is, what could be different between the two WCF services to allow one to be debuggable and the other not.
I have a WCF service with netMsmqBinding. My client can send messages to my queue, and when the service is running it retrieves messages from the queue as expected. If the service is not running, messages received are queued until the service starts.
My problem is that the service does not start when a message hits the queue. The service is hosted in IIS, and so it is not instantiated until IIS receives a request. If I browse to the service then it processes the messages in the queue, but obviously this is not my desired method of processing the queue!
I expect that I need to change the service implementation, or change the IIS setup, but I do not know where or what to change.
UPDATE
Does anyone actually use MSMQ over WCF? I had this working for a short time - I enabled the binding on a different website on the same server, bizarrely - but now it has somehow stopped working again.
The only problem I am having is with the Activation of the service when there is a message in the queue. At present the queue only processes when the service is instantiated, e.g. when I browse the the .svc file. I have the net.msmq protocol enabled on the application, and I have the net.msmq binding enabled on the site... is there anything else I need to do?
You explicitly need to configure IIS for non HTTP activation. I don't know all the details of the top of my head but basically you need to use appcmd to configure and enable the net.msmq binding activation.
Check this blogpost or this screencast should give you all the details.
This might save somebody the hours it took me:
http://msdn.microsoft.com/en-us/library/ms731053.aspx
I believe that my problems using MSMQ binding over WCF were mainly around IIS.
I had no end of problems using Windows XP / Server 2003 with IIS 6.
Using Windows 7 or Server 2008 with IIS 7.5 everything works well.
An even better suggestion is to run MSMQ as a managed service / Windows Service or a stand-alone application rather than under IIS.
I have two workflows in my sequential workflow service library project. But i cannot seem to configure both of the services to run in my wcf service host app. When the service host loads the one service has started but the other is stopped. No amount of fiddling with the app.config file seems to make any difference. How would one configure the hostto support running two WCF Workflows at the same time using the app.config file?
This seems like it would to be easy to configure... just like when you have 2 services running in the same wcf host. Any ideas?
The simple answer is you can't, if I understand your question.
Each WorkflowServiceHost can host one endpoint with one workflow as the implementation of the service contract.
You can configure them in different WorkflowServiceHosts with different endpoint configurations, though.
WorkflowServiceHost host1 = new WorkflowServiceHost(typeof(MyFirstWorkflow), new Uri("URL1"));
WorkflowServiceHost host2 = new WorkflowServiceHost(typeof(MySecondWorkflow), new Uri("URL2"));
host1.Open();
host2.Open();
Hopefully this helps.