tags:

views:

45

answers:

1

Hi SO,

I have a WCF based service that I use to expose AJAX functionality. Sometimes the service fails when I start a new debugging session (even if I make no changes to the service itself). A rebuild all fixes the issue. I never have this issue in production, just while debugging. I use IIS 7 to debug and have disabled all recycling. Below is my config.

Does anyone know why this happens? Is there another way I can configure the service?

Thanks! Jon

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="SomeService.MyAjaxServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="SomeService.MyAjaxService">
        <endpoint address="" behaviorConfiguration="SomeService.MyAjaxServiceAspNetAjaxBehavior" binding="webHttpBinding"
          bindingConfiguration="webBinding"
          contract="SomeService.MyAjaxService" />
        <endpoint address="" behaviorConfiguration="SomeService.MyAjaxServiceAspNetAjaxBehavior" binding="webHttpBinding" 
                  bindingConfiguration="sslWebBinding"
                  contract="SomeService.MyAjaxService" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="sslWebBinding">
          <security mode="Transport">
          </security>
        </binding>
        <binding name="webBinding">
          <security mode="None">
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>
A: 

I ended up having to add batch="false" in the web config. I still need to investigate the full ramifications of this, but at least I don't have to rebuild the service all the time.

Cheers, Jon

Jon Kragh