2

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 Windows 7 and the firewall is disabled.

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Sarathy
  • 442
  • 2
  • 9
  • 20

3 Answers3

1

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

guna Samba
  • 474
  • 1
  • 7
  • 17
1

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:

  1. Make sure your log4net is bin deployed (copied to the bin directory where your program resides. Setting 'Copy Local' to true in 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.

George Stocker
  • 57,289
  • 29
  • 176
  • 237
0

Normally Bad request error happen because of security reasons like:

  1. Firewall
  2. Query string length it

Try disabling the IP Security policies in Windows 7 and see if that fixes the issue.

George Stocker
  • 57,289
  • 29
  • 176
  • 237
guna Samba
  • 474
  • 1
  • 7
  • 17