WCF在localhost上运行但在实时服务器上不正常地失败

时间:2011-08-25 04:27:01

标签: jquery asp.net wcf web-services wcf-binding

我有这个在localhost上正确运行的WCF Web配置。但是当我在实际站点上运行它时,它有时会正常工作,但有时它会因500内部服务器错误而失败

主要问题是什么?

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
       <behavior name="WcfSessionAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>      
        <behavior name="ServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="newbehavior">
          <serviceDebug/>
         <serviceMetadata httpGetEnabled="True"/>
      <serviceThrottling/>
        </behavior>
      </serviceBehaviors>
    </behaviors>  
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" >
    <baseAddressPrefixFilters>
        <add prefix="http://aspxcommerce.com/Service/ASPXCommerceWCFService.svc" />
    </baseAddressPrefixFilters>
    </serviceHostingEnvironment>  
    <services>
      <service name="WcfSession" behaviorConfiguration="newbehavior">
        <endpoint 
            address="" 
            behaviorConfiguration="WcfSessionAspNetAjaxBehavior"
            binding="webHttpBinding" 
            contract="WcfSession" />
        <endpoint 
            address="mex" 
            binding="mexHttpBinding" 
            bindingConfiguration="" 
            contract="WcfSession" ></endpoint>
      </service>
      <service name="ASPXCommerceWCFService" behaviorConfiguration="newbehavior">
         <endpoint 
             address="" 
             behaviorConfiguration="ServiceAspNetAjaxBehavior" 
             binding="webHttpBinding" 
             contract="ASPXCommerceWCFService" >
         </endpoint>
         <endpoint 
             address="mex" 
             binding="mexHttpBinding" 
             bindingConfiguration="" 
             contract="ASPXCommerceWCFService" >
         </endpoint>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
         <binding name="WSHttpBinding_ICustomerService" 
               closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" 
               sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" 
               hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" 
               maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" 
               useDefaultWebProxy="true" allowCookies="false">
           <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
                         maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
           <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
           <security mode="Message">
              <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
              <message clientCredentialType="Windows" negotiateServiceCredential="true" 
                       algorithmSuite="Default" establishSecurityContext="true"/>
           </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
        <endpoint name="WSHttpBinding_ICustomerService"
            address="http://aspxcommerce.com/Service/ASPXCommerceWCFService.svc" 
            binding="wsHttpBinding" 
            bindingConfiguration="WSHttpBinding_ICustomerService" 
            contract="Service" >
        </endpoint>
    </client>
</system.serviceModel>

0 个答案:

没有答案