Geeks With Blogs
HanSolo code monkey
Here is a way for you to disable the Expect: 100-continue Header:

string url = "http://www.myurl.com";
 
ServicePoint sp = ServicePointManager.FindServicePoint(new Uri(url));
sp.Expect100Continue = false;

I was getting a 500 http error when I tried to send a post to a Java web service through .Net using HttpWebRequest. Turning off this header did the trick. This will work even if you are using the WebClient class, which goes through HttpWebRequest under the covers. Hope this helps someone, this is a doozy of a problem to debug.
Posted on Tuesday, April 28, 2009 11:13 PM | Back to top


Comments on this post: Expect: 100-continue Header Problem

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © HanSolo | Powered by: GeeksWithBlogs.net