I use OAuthWebSecurity to login to facebook and it works on localhost. However, after deployment to a real server, the following error message appears:
The remote server returned an error: (400) Bad request.
- I checked the domain information correctly on facebook.
- Sandbox mode is disabled.
- I disabled the windows firewall - still getting the same error.
- The answers from facebook are in the same format, whether in a live or local environment.
- The date and time of the real server is correct.
I tested locally also changing the host file in the real domain - it still works locally.
Here's the stack trace:
[WebException: The remote server returned an error: (400) Bad Request.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +3291120
System.Net.WebClient.DownloadString(Uri address) +207
DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl, String authorizationCode) +293
DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context, Uri returnPageUrl) +167
DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +502
Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthenticationCore(HttpContextBase context, String returnUrl) +231
Any suggestions?
source
share