-1
wsHttpBindingのWCF SOAPサービスがあります.2つのメソッドがありますが、最初のメソッドは正常に実行されますが、何らかの理由で2番目のメソッドの呼び出しがタイムアウトします。私はメソッドをデバッグし、すべてがうまくいけば私のコードは、実行し、返すが、クライアントでは、同じマシン上で、要求がタイムアウトします。私は新しいWCFサービスアプリケーションプロジェクトを作成し、コード+設定全体を新しいプロジェクトにコピーして実行し、そのメソッドは数回タイムアウトしていないので、突然再開しました。ここWCF SOAPサービスのメソッドのタイムアウトが理由なし
はconfigです:
<system.serviceModel>
<services>
<service behaviorConfiguration="PolicyServiceBehavior" name="IST.Broker.Services.PolicyServiceV2.PolicyService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="PolicyServiceBindingConfiguration"
contract="IST.Broker.Services.PolicyServiceV2.IPolicyService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:63915/" />
</baseAddresses>
<timeouts closeTimeout="00:01:00" openTimeout="00:01:00" />
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="PolicyServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceThrottling maxConcurrentCalls="2147483647" maxConcurrentSessions="2147483647" maxConcurrentInstances="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="PolicyServiceBindingConfiguration"
bypassProxyOnLocal="false"
transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2000000"
maxReceivedMessageSize="2000000"
messageEncoding="Text"
textEncoding="utf-8"
useDefaultWebProxy="true"
allowCookies="true">
<readerQuotas
maxDepth="2000000"
maxStringContentLength="2000000"
maxArrayLength="2000000"
maxBytesPerRead="2000000"
maxNameTableCharCount="2000000" />
<reliableSession
enabled="true"
inactivityTimeout="00:01:00" />
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
サービスcotnract:
[ServiceContract(SessionMode = SessionMode.Required)]
public interface IPolicyService
{
[OperationContract(IsInitiating = true)]
void Initialize(int employeeId);
[OperationContract(IsInitiating = false, IsTerminating = false)]
GetPolicyResponse GetPolicy(GetPolicyRequest request);
[OperationContract(IsInitiating = false, IsTerminating = false)]
CreateMtplApplicationResponse CreateMtplApplication(CreateMtplApplicationRequest request);
[OperationContract(IsInitiating = false, IsTerminating = true)]
void SignOut();
}
と実装:
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession)]
public class PolicyService : IPolicyService
{
private Employee _currentEmployee;
public GetPolicyResponse GetPolicy(GetPolicyRequest request)
{
return new GetPolicyResponse(PolicyManager.GetPolicy(request.Id, request.PolicyNumber));
}
public void Initialize(int employeeId)
{
if (!InsuranceCompaniesServiceManager.IsInitialized)
{
var appPhysicalPath = HostingEnvironment.ApplicationPhysicalPath;
_currentEmployee = EmployeeManager.GetEmployee(employeeId);
InsuranceCompaniesServiceManager.Initialize(_currentEmployee, appPhysicalPath);
}
}
public CreateMtplApplicationResponse CreateMtplApplication(CreateMtplApplicationRequest request)
{
return new CreateMtplApplicationResponse(PolicyManager.CreateMtplApplication(request.CompanyId, request.Policy.ToBusinessObject(), request.Vehicle.ToBusinessObject(),
request.Clients.Select(x => x.ToBusinessObject()).ToList(), request.GreenCard.ToBusinessObject(), request.Sticker.ToBusinessObject()));
}
public void SignOut()
{
}
}
EDIT: メソッドが内部呼び出しているDLLを呼び出しています別のサービス。