webclient and expect100continue
        Posted  
        
            by chandra
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by chandra
        
        
        
        Published on 2010-05-06T21:04:43Z
        Indexed on 
            2010/05/06
            21:08 UTC
        
        
        Read the original article
        Hit count: 635
        
What is the best way to set expect100continue when using WebClient(C#.NET). I have this code below, I still see 100 continue in the header. Stupid apache still complains with 505 error.
        string url = "http://aaaa.com";
        ServicePointManager.Expect100Continue = false;
        WebClient service = new WebClient();           
        service.Credentials = new NetworkCredential("username", "password");
        service.Headers.Add("Content-Type","text/xml");
        service.UploadStringCompleted += (sender, e) => CompleteCallback(BuildResponse(e));
        service.UploadStringAsync(new Uri(url), "POST", query);
© Stack Overflow or respective owner