locked
Self-hosted WCF service inaccessible in IIS and AppFabric RRS feed

  • Question

  • Hi,

    For a few weeks now I've been having a really weird problem. I have a couple of services which work just fine when self-hosted in a command line app. However in IIS+AppFabric I cannot access one of the services - I get TimeoutException and am pretty sure that the call doesn't even make it to the service (all services have an aspect to log all calls before doing anything). Note that both services are configured identically with regards to bindings and behaviors by code. I tried many things like putting them on different app pools, disabling some of the transports... And what is really strange that if both services are in one app pool - one of the services works but if I put them on separate threads - the other service times-out. It really drives me nuts...

    Also I see pretty often events in the system event log: "A process serving application pool 'Authorization Management' suffered a fatal communication error with the Windows Process Activation Service. The process id was '11852'. The data field contains the error number." The error number is 0x80070218. After the event the service host initializes without problems (I can see my own info log messages) however the service is unreachable

    Does this ring a bell to anyone?

    Here are a few things about the IIS/AppFabric configuration:

    • Site bindings: http; https; net.tcp 808:*; net.pipe *
    • Running Windows services: net.pipe listener adapter; net.tcp listener adapter; net.tcp port sharing; www
    • Enabled protocols for each of the services: http,net.tcp,net.pipe
    • Each of the services is enabled for auto-start
    • The application pools use .NET 4.0 in integrated mode with ApplicationPoolIdentity
    • Each of the pools are enabled for auto-start

    Thanks Val




    • Edited by Valo Thursday, June 20, 2013 4:01 PM
    Wednesday, June 19, 2013 7:32 PM

Answers

  • It turned out that I had a bug in the initialization of the services' hosts - I was trying something and when removed the try code aparently I didn't delete the first line which was locking some resource.

    Anyway, it is a good leson nevertheless - if your services do not work, your initialization might be buggy...

    Sorry about the noice.


    Thanks Val

    Thursday, June 20, 2013 10:40 PM

All replies

  • Hi Val,

    Is the problem only occurs for the service deployed in production environment? If you can repro the problem with some testing environment, it would be helpful for further troubleshooting. You can try launching VS IDE and attach the application process to see if there is any other exception thrown before the error you mentioned.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 20, 2013 5:20 PM
  • No, the problem is on my desktop. Launching the VS IDE doesn't help: like I said, the call doesn't make it to the service at all... I don't even see it in the WCF logs.

    Thanks Val


    • Edited by Valo Thursday, June 20, 2013 9:56 PM added detail
    Thursday, June 20, 2013 9:25 PM
  • It turned out that I had a bug in the initialization of the services' hosts - I was trying something and when removed the try code aparently I didn't delete the first line which was locking some resource.

    Anyway, it is a good leson nevertheless - if your services do not work, your initialization might be buggy...

    Sorry about the noice.


    Thanks Val

    Thursday, June 20, 2013 10:40 PM