이 문제는 Google 서비스에 액세스하는 모든 클라이언트에서 발생하지 않지만 일관성있는 것은 오류가 발생했을 때 소수의 고객을위한 동일한 서비스 요청.받기 403 금지 된 오류. 클라이언트 인증 스키마 '익명'으로 HTTP 요청이 금지되었습니다.
System.ServiceModel.Security.MessageSecurityException The HTTP request was forbidden with client authentication scheme 'Anonymous'. System.ServiceModel.Security.MessageSecurityException: The HTTP request was forbidden with client authentication scheme 'Anonymous'. > ---> System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Security.IssuanceTokenProviderBase
1.DoNegotiation(TimeSpan timeout) at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout) at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory
1.ClientSecurityChannel1.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout) at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionClientSettings
1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at > Proxy.FileTransferService.IFileTransferService.EstablishProxy(DownloadRequest request) at Proxy.FileTransferService.FileTransferServiceClient. Proxy.FileTransferService.IFileTransferService.EstablishProxy(DownloadRequest request) at NormalFileTransferServiceClient.Download(Int32 packageId, IStreamWriter downloader, Archiver archiver) at LoggingFileTransferServiceClient.Download(Int32 packageId, ISt
그 예외가 클라이언트에 의해 발생되고 : 여기
예외의 세부 사항입니다. (내가 제대로 모든 것을 설정 한 경우) 몇 클라이언트는은 BasicHttpBinding을 사용하고 있습니다 : 는<binding name="WSHttpBinding_IFileTransferService" 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="Mtom"
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="UserName" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
<endpoint address="http://[hostname]/FileTransferService.svc/FileTransfer"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFileTransferService"
contract="Proxy.FileTransferService.IFileTransferService"
name="WSHttpBinding_IFileTransferService">
<identity>
<certificate encodedValue="a long string"/>
</identity>
</endpoint>
서비스 구성은
<service behaviorConfiguration="ServiceBehavior"
name="Services.FileTransferService">
<endpoint name="WSHttpBinding_IFileTransferService"
binding="wsHttpBinding"
bindingConfiguration="MtomWSHttpBinding"
contract="Services.IFileTransferService"
address="/FileTransfer"/>
<endpoint binding="basicHttpBinding"
bindingConfiguration="FileTransferServicesBinding"
contract="Services.IFileTransferService"/>
<host>
<baseAddresses>
<add baseAddress="http://[hostname]/FileTransferService.svc"/>
</baseAddresses>
</host>
</service>
<binding name="wsHttpBinding"
maxReceivedMessageSize="2147483647"
receiveTimeout="5"
useDefaultWebProxy="false">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="Message">
<message clientCredentialType="UserName" />
</security>
</binding>
<basicHttpBinding>
<binding name="FileTransferServicesBinding"
maxReceivedMessageSize="10067108864"
messageEncoding="Mtom"
transferMode="Streamed"
useDefaultWebProxy="false">
<security mode="None">
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
주 :
IFileTransferService의 클라이언트 프록시 구성이다. 클라이언트의 최신 릴리스에서는 완전히 분산되지 않았을 수 있습니다 (2 버전을 지원해야하는 이유). 대신 wsHttpBinding 끝점을 사용하도록 프록시를 변경했습니다. 나는이 오류가 내가 basicHttp에만 해당되는지 궁금 하네. 만약 그렇다면 어쩌면이 설정이 올바르게 설정되어 있지 않은지 궁금 할 것이다. 나는이 403 오류를 얻는 클라이언트가 wsHttpBinding을 사용한다는 가정하에 있습니다. 여기
이 서비스에 대한 코드입니다 : 뭔가 withing에 내 컨트롤이이 예외를 치우는 경우public RemoteBinaryInfo EstablishProxy(DownloadRequest request)
{
int packageId = request.PackageId;
System.IO.MemoryStream stream = new System.IO.MemoryStream(packageRepository.GetPackageBinary(packageId));
DisposeStreamWhenOperationIsComplete(stream, OperationContext.Current);
RemoteBinaryInfo result = new RemoteBinaryInfo();
result.Length = stream.Length;
result.MemoryByteStream = stream;
return result;
}
private static void DisposeStreamWhenOperationIsComplete(System.IO.MemoryStream stream, OperationContext clientContext)
{
clientContext.OperationCompleted += new EventHandler(delegate(object sender, EventArgs args)
{
if (stream != null)
stream.Dispose();
});
}
가 하나라도 알고 있나요입니까? 클라이언트 또는 서비스 구성 파일에서 구성을 변경할 수 있습니까?
더 이상 정보가 필요하면 알려주십시오.
아직 완료되지 않은 경우 간단한 hello world 메서드를 노출하여 문제를 격리해야합니다. – JoeBilly