Windows Phone 7 HttpRequest Unable to see true Error Code and response details

Posted by Bob on Stack Overflow See other posts from Stack Overflow or by Bob
Published on 2011-02-07T23:16:50Z Indexed on 2011/02/07 23:25 UTC
Read the original article Hit count: 239

Filed under:
|

I have to call a somewhat broken API from a Windows Phone 7 application. The API returns a 302 error and a cookie to the authentication request. I've tried every way I've been able to find in the MSDN documentation for using ClientHTTP instead of BrowserHTTP (registering the prefix, using the call to explicitly create a ClientHTTP using Request), but the 302 is getting translated to a 404 and I'm not seeing the cookies on the response. I've tried a WebClient, I've tried an HttpRequest and it is always the translated error message. If I allocate a CookieContainer for the HttpRequest, I get a null argument exception when the client stack is parsing the returned message. I can see that the response is coming back as expected via Fiddler.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about windows-phone-7