3 messages in com.googlegroups.bloggerdevRe: Sanity Check Please
FromSent OnAttachments
ooartist22 Aug 2006 07:41 
Pete Hopkins ☠22 Aug 2006 10:27 
ooartist22 Aug 2006 11:15 
Subject:Re: Sanity Check Please
From:ooartist (byro@magellanpress.com)
Date:08/22/2006 11:15:07 AM
List:com.googlegroups.bloggerdev

Pete Hopkins ☠ wrote:

On 8/22/06, ooartist <byro@magellanpress.com> wrote:

I am trying to get a feed from a blog from blogger.com (that is not beta). I am using the C# Client Libs to do this. I followed the examples and here is my code:

Oh, and this is running in a ASP.NET 2.0 web application.

When I execute this code I get a 500 error from blogger.

I use fiddler and I can see this stack trace from the blogger server:

What Accept: header are you sending with your request?

Are you modifying/specifying it in any way in your own code?

-- Pete

I am not specifying *any* Accept headers. The code I posted above is all that I have done. My assumption was if I use the client libs I did not have to monkey with headers at all.

Ah, that is it. It seems maybe that the .NET 2.0 HttpWebRequest does not place any Accept headers in the request. So in the C# class "GDataRequest" in the method "EnsureWebRequest" I did:

... web.ContentType = "application/atom+xml;charset=UTF-8"; web.UserAgent = this.userAgent; web.Accept = "*/*"; // <-- MY ADD ...

I rebuilt the libs and IT WORKED!

Thanks for the nudge.

Byron McClain