Веб-сервис WCF, кажется, идет бесконечным циклом - PullRequest
0 голосов
/ 20 февраля 2019

У меня есть веб-сервис, который я создал, и я вызываю метод внутри него и регистрируюсь в текстовом файле.Кажется, он перезапускает этот метод бесконечное количество раз, так как он продолжает записывать одну и ту же строку.Я подозреваю, что это может быть что-то в моем конфигурационном файле, что неправильно, кто-то может очень привязать и т. Д. PLS?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>

  </appSettings>
  <system.web>
    <customErrors mode="Off"/>
    <compilation targetFramework="4.6.1" />
    <httpRuntime targetFramework="4.6.1" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="TLS_Service.Service1">
        <endpoint address="" binding="webHttpBinding" contract="TLS_Service.IService1" behaviorConfiguration="webBehavior" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="webBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.SharePoint.Client" publicKeyToken="71e9bce111e9429c" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.SharePoint.Client.Runtime" publicKeyToken="71e9bce111e9429c" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

1 Ответ

0 голосов
/ 22 февраля 2019

Кажется, что проблема здесь: нехватка ОЗУ на сервере / слишком много запросов ExecuteQuery в коде веб-службы.

...