Skip to content


How to fix WCF Error The remote server returned an unexpected response: (417) Expectation failed.

Originally from: http://nahidulkibria.blogspot.com/2009/06/how-to-fix-wcf-error-remote-server.html

Few day’s ago one of our project(using wpf and wcf ) going live and we are start getting lots of weird error one of is 417 the remote server return unexpected response.
after some investigation and we found its only occur when client are behind a proxy in our case its squid(http://www.squid-cache.org/) and has a configuration like following in squid.conf

#This option makes Squid ignore any Expect: 100-continue header present
#in the request. Note: Enabling this is a HTTP protocol violation, but some #client may not handle it well.. #Default:
ignore_expect_100 off

we are solving this problem can be solved by changing squid configuration
ignore_expect_100 on

the following settings on the app.config also solved the problem






but if you have control over your proxy server settings change that. if you do not have chance to change proxy settings and handle this with changing app.config may be facing problem upload large amount of file

for more information you can check this
http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Slashdot
  • Technorati

Posted in C#, Code Monkey, Geekspeak, Open Source, PFSense, System Admin.

Tagged with , , , , , , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.