Solved

Intermittent IIS 400 Bad Request when using HttpWebResponse

Posted on 2011-09-06
3
320 Views
Last Modified: 2012-05-12
I am using the following C# example against Exchange 2003:

http://msdn.microsoft.com/en-us/library/ms877306(v=exchg.65).aspx.

The sample code intermittently encounters a 400 "Bad Request" error when trying to save an Exchange appointment. The error occurs on the command-line:

PROPPATCHResponse = (System.Net.HttpWebResponse)PROPPATCHRequest.GetResponse();

How can I find the cause of this problem?
0
Comment
Question by:brian_appliedcpu
  • 2
3 Comments
 
LVL 28

Assisted Solution

by:strickdd
strickdd earned 500 total points
ID: 36490099
My initial inclimnation is that you are not encoding your XML characters (i.e., < should be &lt;). That would form a bad request. I would also recommend drilling down into the web resposne object to see if it gives more error deatils. The last thing is to print out the request object and make sure that it is properly formatted and isn't missing any parameters for any reason.
0
 
LVL 2

Accepted Solution

by:
brian_appliedcpu earned 0 total points
ID: 36570890
I will look at this when i get a moment, things have been crazy.
0
 
LVL 2

Author Closing Comment

by:brian_appliedcpu
ID: 36908448
Sorry for the slow followup. I was passing a webdav string that contained (among other things) a timezone setting and the XML that specified the setting was mal-formed.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question