none
WCF service in IIS 8 crashes when recycled during an active Connection RRS feed

  • Question

  • Hello,

    I've created a simple WCF service and hosted the service in IIS8. I've built a testconsole to simulate an active environment and permanent access on my service. If the App-Pool in IIS8 is now recycled while there is a connection from a client to the service, the service crashes and wont start again. If I try to recycle or restart the pool while a client tries to connect, the service stays in ist crashed state until recycle or restart is done without any active Connections.

    If the recycle button is pressed without any active connections then the pool recycles and the service is alive.

    Is there a property or some options to prefent the crash?

    Pool Information: .Net CLR Version v4.0.30319

    Managed Pipeline mode: Integrated

    WCF service web.config:

    <?xml version="1.0"?>
    <configuration>
      <appSettings>
        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
      </appSettings>
      <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true" targetFramework="4.5.2" />
        <httpRuntime targetFramework="4.5.2"/>
      </system.web>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <protocolMapping>
          <add binding="basicHttpBinding" scheme="http" />
        </protocolMapping>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
        <bindings>
          <basicHttpBinding>
            <binding>
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
      </system.serviceModel>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true"/>
        <directoryBrowse enabled="true"/>
      </system.webServer>
    </configuration>

    Marcel

    • Moved by Fred Bao Wednesday, December 16, 2015 3:19 AM wcf related
    Tuesday, December 15, 2015 10:30 AM

Answers

All replies

  • Hi Marcel,

    Since your question is aboutwcfconfiguration.

    You can get better help at the following link

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

    Thanks for your understanding.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 16, 2015 3:18 AM
  • Hi Marcel Burtscher,

    According to this case, in my opinion, we need to make sure the issue where happened.

    So, I suggest you need to check the IIS log file. We also need to trace the WCF Service,

    It will help us to get more  information.

    For more information, please refer to the following articles:

    1.Troubleshooting badly behaving IIS application pools

    http://blogs.msdn.com/b/benjaminperkins/archive/2013/07/01/troubleshooting-badly-behaving-iis-application-pools.aspx

    2.Configuring Tracing

    https://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx

    Best Regards,

    Wanjun Dong


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, December 16, 2015 8:29 AM
    Moderator
  • Hello Wanjun Dong,

    Your suggestion helped me alot. I've checked the IIS log file and found out, that the crash was just a side-effect of another error and by adding the following lines in my web.config the error went away:

    <system.web>
      <identity impersonate="false" />
      <authentication mode="Windows" />
      ...
    <System.web>

    It works pretty well now but i have no Idea why the service needs the two entries. Any suggestions on that?

    Best Regards


    Thursday, December 17, 2015 6:47 AM
  • Hi Marcel Burtscher,

    I will suggest you ask this question in new thread, we can discussion this issue in new thread. 

    Because, that will help more people who are searching for the same problem.

    One thread, one question.

    Thanks for your understanding.

    Best Regards,

    Wanjun Dong


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, December 18, 2015 8:15 AM
    Moderator