요청 채널은 00:00:59 이후 회신을 기다리는 동안 시간이 초과되었습니다.
-
10-12-2019 - |
문제
매우 기본적인 SharePoint WebService를 작성하고 있습니다. 나는 2010 년 작은 라이브러리에 대해 테스트했으며 매번 괜찮습니다.
문제는 라이브러리가 매우 큰 MOSS 2007 서버와 함께 제공됩니다. 나는 .NET 3.5를 사용하고 있으며 코드의 세 줄 바로 아래에 있습니다. 무작위로 오류가 발생합니다. 00:00:59 이후에 회신을 기다리는 동안 요청 채널이 시간이 초과되었습니다. 시간 초과를 늘리면 여전히 무작위로 오류가 발생합니다. 기본 연결이 닫혔습니다. 연결이 예기치 않게 닫혔습니다.
ListsSoapClient client = new ListsSoapClient();
client.ClientCredentials.Windows.ClientCredential
= System.Net.CredentialCache.DefaultNetworkCredentials;
client.ClientCredentials.Windows.AllowedImpersonationLevel
= System.Security.Principal.TokenImpersonationLevel.Impersonation;
XmlElement listCollection = client.GetListCollection();
.
나는 왜 무작위로 그것을 빼내고 휴식을 취하고, 서버에는 문제가 없다. U2U CAML 빌더가 있고 사용하지 않아도 쿼리를 실행하고 즉시 결과를 얻을 수 있습니다.
나는 내 app.config에 뭔가 잘못되었거나 클라이언트 측에서 설정 해야하는 것 같아요.
내 app.config는 설정 이하,
<binding name="ListsSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
.
및
<client>
<endpoint address="http://ap/AP/_vti_bin/Lists.asmx" binding="basicHttpBinding"
bindingConfiguration="ListsSoap" contract="SharePointListWebService.ListsSoap"
name="ListsSoap" />
<endpoint address="http://ap/AP/_vti_bin/Copy.asmx" binding="basicHttpBinding"
bindingConfiguration="CopySoap" contract="SharePointCopyWebService.CopySoap"
name="CopySoap" />
</client>
.
나는 chnage가 10 분으로 칠할 때 아래 오차를받습니다. 그리고 다시, 무작위 .
. Unhandled Exception: System.ServiceModel.CommunicationException: The underlying
connection was closed: A connection that was expected to be kept alive was close
d by the server. ---> System.Net.WebException: The underlying connection was clo
sed: A connection that was expected to be kept alive was closed by the server.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
nnelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebExc
eption(WebException webException, HttpWebRequest request, HttpAbortReason abortR
eason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
nnelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeS
pan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message messag
e, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at FetchInvoicesFromSharePointForMaximo.SharePointListWebService.ListsSoap.Ge
tListCollection(GetListCollectionRequest request)
at FetchInvoicesFromSharePointForMaximo.SharePointListWebService.ListsSoapCli
ent.FetchInvoicesFromSharePointForMaximo.SharePointListWebService.ListsSoap.GetL
istCollection(GetListCollectionRequest request) in C:\FetchInvoicesFromSharePoin
tForMaximo\FetchInvoicesFromSharePointForMaximo\Service References\SharePointLis
tWebService\Reference.cs:line 2267
at FetchInvoicesFromSharePointForMaximo.SharePointListWebService.ListsSoapCli
ent.GetListCollection() in C:\FetchInvoicesFromSharePointForMaximo\FetchInvoices
FromSharePointForMaximo\Service References\SharePointListWebService\Reference.cs
:line 2273
at FetchInvoicesFromSharePointForMaximo.Program.Main(String[] args) in C:\Fet
chInvoicesFromSharePointForMaximo\FetchInvoicesFromSharePointForMaximo\Program.c
s:line 32
해결책 2
나는 문제를 해결하지만 HWY 가이 일이 일어 났는지 확신하지 못한다.
솔루션은 웹 참조로 추가 된 서비스 참조로 추가하는 대신에 TRICK을 추가했습니다.
이유로 내 가정은 아래에 있습니다.
- MOSS 2007은 서비스 참조가 작성한 프록시 클라이언트를 사용하지 않습니다
- 내 네트워크에서 우리는 다른 도메인에서 동일한 이름의 응용 프로그램을 가지고 있지만 서비스 참조에서 완전한 이름을 사용하고 있지만 가 발생하지 않아야합니다.
감사합니다
다른 팁
다음을 변경하십시오 :
closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
.
to :
closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00"
.