0
WCFサービスを使用しているときに問題が発生しています。私はコンソールアプリケーションでWCFサービスを消費し、100回のリクエストまで(ループ内で)うまく動作します。しかし、100リクエスト後に動作を停止します。私は既に使用していますWCFサービスが100回の呼び出し後に機能しなくなる
<serviceThrottling
maxConcurrentCalls="500"
maxConcurrentInstances="500"
maxConcurrentSessions="500"/>
私の設定では、この問題には影響しません。私はサービスへの呼び出しのたびに接続を終了しましたが、それでも問題は解決しません。
ご協力いただきまして誠にありがとうございます。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<connectionStrings>
<add name="PriceGain" connectionString="Server=xyz.abc.com;Database=SomeDB;User Id=appuser;password=xxxxxxx;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime/>
</system.web>
<system.serviceModel>
<services>
<service name="AirGainUtilities.Service.Utilities" behaviorConfiguration="UtilitiesBehavior">
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
<endpoint address="http://192.168.1.1/AirGain.Utilities.Service/Utilities.svc" binding="basicHttpBinding" contract="AirGainUtilities.Service.IUtilities" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="UtilitiesBehavior">
<!-- 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="true" />
<serviceThrottling
maxConcurrentCalls="5000"
maxConcurrentInstances="5000"
maxConcurrentSessions="5000"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
<add binding="basicHttpBinding" scheme="http" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false" />
</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" />
<defaultDocument>
<files>
<add value="Utilities.svc" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
私の最後の
本当に愚かな? –
こんにちは首藤、 実際のところ、私は、私はWCFに新しいです例外 のいずれかを取得しておりません私が何か間違ったことをやっていることがあります。 公共一覧 GetDestinationHotelId(文字列DestinationAirport) { { パッケージobjPkg =新しいパッケージ()してみてください。 リターンobjPkg.GetDestinationHotelId(DestinationAirportを);} catch(Exception fe) { throw new FaultException(fe.Message); } // nullを返します。 } 上記は私のサービス契約方法です。 –
kulesshhh
以下は、それを消費するクライアントアプリケーションのコードです: int x = 0; while(true) { x ++;使用 (AirGainUtilities.Service.UtilitiesClient UC =新しいAirGainUtilities.Service.UtilitiesClient()){ リスト lstHotels = UC.GetDestinationHotelId( "SJD")。 if(lstHotels.Count <= 0) { x ++; } } } –
kulesshhh