Solved

Intermittent IIS 400 Bad Request when using HttpWebResponse

Posted on 2011-09-06
3
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Suggested Solutions

Title # Comments Views Activity
Telerik RadEditor Control Save 8 39
PowerShell: Adding ToGB to a script 4 74
How do you think this website does searches? 5 34
CSS styling problem 3 27
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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