How do I debug a 400 Bad Request error with DotNetOpenAuth?
I'm using DotNetOpenAuth to connect to the LinkedIn API. I am getting a (400) Bad Request when trying to call the BeginAuthorize method in their API. What am I doing wrong? I'm using Win开发者_如何学JAVAdows 7 and the firewall is disabled.
even i have faced the same problem. this one is not related to windows 7 security policy. the Date & time (local system) is not matched with your linked-in API (server).
Debug your code and gothru the inner details of the exception..
By Installing Network Time Protocol in your system would solve the problem
Thanks, Gunasekaran Sambandhan
When you get a 400 BadRequest, there's always more information. To get that information, you have to enable logging in DotNetOpenAuth. Here are a few things to make sure of:
- Make sure your
log4netis bin deployed (copied to thebindirectory where your program resides. Setting 'Copy Local' totruein Visual Studio will do this for you.
The 'bad request' (with complete information) will show up in wherever you have logging set up for Log4net. Here's an example of what it looks like to set up Log4Net.
Normally Bad request error happen because of security reasons like:
- Firewall
- Query string length it
Try disabling the IP Security policies in Windows 7 and see if that fixes the issue.
加载中,请稍侯......
精彩评论