S
SESDev
We have a WCF service which works just fine until it has to call through a
proxy server and then we're havign problems.
Network with ISA Server acting as proxy, notebook attached to network - not
part of the domain but using a domain account to authenticate with the ISA
Server for Internet access.
We have small application that performs some local tasks and then calls an
IIS hosted WCF service to update stats essentially.
When outside of the above setup (i.e. in the development environment which
has no such proxy) all works just fine and the stats are updated with the WCF
service call.
When on the notebook and behind the proxy we are getting problems. Firstly
we were not using the default proxy and getting an error:
System.ServiceModel.ProtocolException: The remote server returned an
unexpected response: (407) Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied. ). ---> System.Net.WebException: The remote server
returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.GetResponse()
at
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
After adding the following to the app.config
<system.net>
<defaultProxy
useDefaultCredentials="true">
<proxy autoDetect="True"/>
</defaultProxy>
</system.net>
We now get the following error:
System.ServiceModel.Security.SecurityNegotiationException: The caller was
not authenticated by the service. ---> System.ServiceModel.FaultException:
The request for security token could not be satisfied because authentication
failed.
at
System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message
message, EndpointAddress target)
at
System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
--- End of inner exception stack trace ---
My biggest problem is that I am remote to the network and do not have direct
access - I have someone on the inside as my hands & eyes, so debugging has
been a slow process.
<system.serviceModel>
<diagnostics>
<messageLogging maxMessagesToLog="30000"
logEntireMessage="true"
logMessagesAtServiceLevel="false"
logMalformedMessages="true"
logMessagesAtTransportLevel="true">
</messageLogging>
</diagnostics>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IDEService"
closeTimeout="00:01:00"
openTimeout="00:05:00" receiveTimeout="00:10:00"
sendTimeout="00:05:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" 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="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint
address="http://dev.thedomain.com/DEService/DEService.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IDEService"
contract="SESDEService.IDEService"
name="WSHttpBinding_IDEService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning,
ActivityTracing" propagateActivity="true" >
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\temp\TaskRunner.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<system.net>
<defaultProxy
useDefaultCredentials="true">
<proxy autoDetect="True"/>
</defaultProxy>
</system.net>
We've tried the various (5) options for proxyCredentialType="???" with no
success for any of them. I've also noticed that the binding.ProxyAddress is
not set on the client (when outputting it in code).
I've added tracing to the client app and can provide the trace (I am not
quite sure what to do with that - any help is greatly appreciated) -
http://www.swiftest.com/taskrunner.zip
Please help asap!!
proxy server and then we're havign problems.
Network with ISA Server acting as proxy, notebook attached to network - not
part of the domain but using a domain account to authenticate with the ISA
Server for Internet access.
We have small application that performs some local tasks and then calls an
IIS hosted WCF service to update stats essentially.
When outside of the above setup (i.e. in the development environment which
has no such proxy) all works just fine and the stats are updated with the WCF
service call.
When on the notebook and behind the proxy we are getting problems. Firstly
we were not using the default proxy and getting an error:
System.ServiceModel.ProtocolException: The remote server returned an
unexpected response: (407) Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied. ). ---> System.Net.WebException: The remote server
returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.GetResponse()
at
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
After adding the following to the app.config
<system.net>
<defaultProxy
useDefaultCredentials="true">
<proxy autoDetect="True"/>
</defaultProxy>
</system.net>
We now get the following error:
System.ServiceModel.Security.SecurityNegotiationException: The caller was
not authenticated by the service. ---> System.ServiceModel.FaultException:
The request for security token could not be satisfied because authentication
failed.
at
System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message
message, EndpointAddress target)
at
System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
--- End of inner exception stack trace ---
My biggest problem is that I am remote to the network and do not have direct
access - I have someone on the inside as my hands & eyes, so debugging has
been a slow process.
<system.serviceModel>
<diagnostics>
<messageLogging maxMessagesToLog="30000"
logEntireMessage="true"
logMessagesAtServiceLevel="false"
logMalformedMessages="true"
logMessagesAtTransportLevel="true">
</messageLogging>
</diagnostics>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IDEService"
closeTimeout="00:01:00"
openTimeout="00:05:00" receiveTimeout="00:10:00"
sendTimeout="00:05:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" 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="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint
address="http://dev.thedomain.com/DEService/DEService.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IDEService"
contract="SESDEService.IDEService"
name="WSHttpBinding_IDEService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning,
ActivityTracing" propagateActivity="true" >
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\temp\TaskRunner.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<system.net>
<defaultProxy
useDefaultCredentials="true">
<proxy autoDetect="True"/>
</defaultProxy>
</system.net>
We've tried the various (5) options for proxyCredentialType="???" with no
success for any of them. I've also noticed that the binding.ProxyAddress is
not set on the client (when outputting it in code).
I've added tracing to the client app and can provide the trace (I am not
quite sure what to do with that - any help is greatly appreciated) -
http://www.swiftest.com/taskrunner.zip
Please help asap!!