Bad Request Exception when calling CreateRequest against Google

320 views
Skip to first unread message

Dave W

unread,
May 2, 2012, 1:58:50 AM5/2/12
to DotNetOpenAuth
Hello

I am using DNOA to authenticate users against Google. I have noticed
that I get the following exceptions logged in the log file even though
the authentication goes on to succeed. I am using version 4.0.0.12084
of DotNetOpenAuth.

I was wondering if this is expected or not?

This thread seems pretty similar to what I am seeing (i.e. it is slow,
similar errors and in the end it succeeds) but it is two years old now
so I am not sure if it still applies:
http://groups.google.com/group/dotnetopenid/browse_thread/thread/2ae86f3fb0fbd95f/b1214164ea6774a8?lnk=gst&q=bad+request+CreateRequest#b1214164ea6774a8

Any help would be appreciated! Thanks!

Cheers,
Dave

The exceptions from the logs (I can provide I full log if required):
ERROR 2012-05-02 17:00:15,674 7536ms Http -
WebException from https://www.google.com/accounts/o8/user-xrds?uri=http:%2F%2Fsomegoogledomain.com%2F:
<!DOCTYPE html>
<html>
<head>
<title>Google Accounts</title>
<style type="text/css">
body {font-family: arial,sans-serif;}
.body {margin: 15px 15px; }
</style>
</head>
<body dir="" ><style type="text/css">
.aligns {
text-align: ;
}
.margins {
margin-: 13px;
}
.floats-normal {
float: ;
}
.floats-reverse {
float: ;
margin-top: 17px;
}
</style>
<div class="header margins" style="height: 59px; margin: 33px 15px
9px 15px;">
<img src="https://www.google.com/intl//images/logos/
accounts_logo.gif" alt="Google Accounts" height="40px;"/>
</div>
<div style="clear:both;"></div>
<div class="body">
</div>
<div class="footer" style="color: #666; font-size: smaller; margin:
50px 15px 0 15px; text-align: center;">
&copy;2009 Google -
<a href="http://www.google.com">Google Home</a> -
<a href="https://www.google.com/accounts/TOS?hl=">Terms of Service</
a> -
<a href="http://www.google.com/intl//privacy.html">Privacy Policy</
a> -
<a href="http://www.google.com/support/accounts?hl=">Help</a>
</div>
</body>
</html>
WARN 2012-05-02 17:00:18,456 10319ms Yadis -
HTTP GET error while retrieving described-by XRDS document
https://www.google.com/accounts/o8/user-xrds?uri=http%3A%2F%2Fsomegoogledomain.com%2F:
DotNetOpenAuth.Messaging.ProtocolException: Error occurred while
sending a direct message or getting the response. --->
System.Net.WebException: The remote server returned an error: (400)
Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) in c:\BuildAgent\work
\6fe1ab573d75f9ba\src\DotNetOpenAuth.Core\Messaging
\StandardWebRequestHandler.cs:line 127
--- End of inner exception stack trace ---
at
DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) in c:\BuildAgent\work
\6fe1ab573d75f9ba\src\DotNetOpenAuth.Core\Messaging
\StandardWebRequestHandler.cs:line 173
at
DotNetOpenAuth.Messaging.UntrustedWebRequestHandler.GetResponse(HttpWebRequest
request, DirectWebRequestOptions options) in c:\BuildAgent\work
\6fe1ab573d75f9ba\src\DotNetOpenAuth.Core\Messaging
\UntrustedWebRequestHandler.cs:line 250
at
DotNetOpenAuth.OpenId.HostMetaDiscoveryService.GetXrdsResponse(UriIdentifier
identifier, IDirectWebRequestHandler requestHandler, Uri xrdsLocation)
in c:\BuildAgent\work\6fe1ab573d75f9ba\src
\DotNetOpenAuth.OpenId.RelyingParty\OpenId
\HostMetaDiscoveryService.cs:line 311
at
DotNetOpenAuth.OpenId.HostMetaDiscoveryService.GetExternalServices(IEnumerable`1
xrds, UriIdentifier identifier, IDirectWebRequestHandler
requestHandler) in c:\BuildAgent\work\6fe1ab573d75f9ba\src
\DotNetOpenAuth.OpenId.RelyingParty\OpenId
\HostMetaDiscoveryService.cs:line 191

Andrew Arnott

unread,
May 2, 2012, 9:54:06 AM5/2/12
to dotnet...@googlegroups.com
The thread you linked to was never fully resolved, although a private build I prepared for those folks alleviated the symptoms.  I'm not sure your symptoms are the same though -- they don't sound similar yet.

If you can please send me the full log I'd appreciate it.  It would be helpful if you could preserve it exactly (no obfuscated domain names) so that I can try reproducing it if necessary.  Feel free to send it privately just to me if that's more comfortable.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre



--
You received this message because you are subscribed to the Google Groups "DotNetOpenAuth" group.
To post to this group, send email to dotnet...@googlegroups.com.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.


Dave W

unread,
May 6, 2012, 5:32:15 PM5/6/12
to DotNetOpenAuth
Hi Andrew

Thanks for your response!

I sent the full log file to you last week. I was just wondering if you
have received it? Thanks very much!

Cheers,
Dave

On May 3, 1:54 am, Andrew Arnott <andrewarn...@gmail.com> wrote:
> The thread you linked to was never fully resolved, although a private build
> I prepared for those folks alleviated the symptoms.  I'm not sure your
> symptoms are the same though -- they don't sound similar yet.
>
> If you can please send me the full log I'd appreciate it.  It would be
> helpful if you could preserve it exactly (no obfuscated domain names) so
> that I can try reproducing it if necessary.  Feel free to send it privately
> just to me if that's more comfortable.
>
> --
> Andrew Arnott
> "I [may] not agree with what you have to say, but I'll defend to the death
> your right to say it." - S. G. Tallentyre
>
> On Tue, May 1, 2012 at 10:58 PM, Dave W <dave.whar...@gdev.intilecta.com>wrote:
>
>
>
>
>
>
>
> > Hello
>
> > I am using DNOA to authenticate users against Google. I have noticed
> > that I get the following exceptions logged in the log file even though
> > the authentication goes on to succeed. I am using version 4.0.0.12084
> > of DotNetOpenAuth.
>
> > I was wondering if this is expected or not?
>
> > This thread seems pretty similar to what I am seeing (i.e. it is slow,
> > similar errors and in the end it succeeds) but it is two years old now
> > so I am not sure if it still applies:
>
> >http://groups.google.com/group/dotnetopenid/browse_thread/thread/2ae8...
>
> > Any help would be appreciated! Thanks!
>
> > Cheers,
> > Dave
>
> > The exceptions from the logs (I can provide I full log if required):
> > ERROR 2012-05-02 17:00:15,674  7536ms Http                           -
> > WebException from
> >https://www.google.com/accounts/o8/user-xrds?uri=http:%2F%2Fsomegoogl...
> > :
> >https://www.google.com/accounts/o8/user-xrds?uri=http%3A%2F%2Fsomegoo...
> > :
> > DotNetOpenAuth.OpenId.HostMetaDiscoveryService.GetExternalServices(IEnumera ble`1

Andrew Arnott

unread,
May 11, 2012, 12:04:47 AM5/11/12
to dotnet...@googlegroups.com
Yes, I received it.  Sorry for the sluggish response.  I've skimmed through the logs and it appears this doesn't show the "perf problem" that I was investigating a year or so ago.  Instead these HTTP 400 error responses seem like a new issue.  

I'm afraid I don't have time to personally investigate why it's failing for you.  Can you contact Google for support?

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre


Dave Wharton

unread,
May 16, 2012, 6:43:45 PM5/16/12
to dotnet...@googlegroups.com
Hi Andrew

Thanks for your time looking into this for me.

Yes, I can log this with Google. Do you mind pointing me in the right direction of where to log this with Google (assuming you might know) and is it sufficient to say I am getting a 400 (Bad Request) error when accessing the URL "https://www.google.com/accounts/o8/user-xrds?uri=http:%2F%2Fsomegoogledomain.com%2F" via the DNOA library?

Thanks heaps!

Cheers,
Dave

Andrew Arnott

unread,
May 16, 2012, 7:52:14 PM5/16/12
to dotnet...@googlegroups.com
I don't know of the appropriate place to log this with Google.  You'll have to look through their support system.

I recommend you capture a network trace (using Fiddler perhaps) of the actual request including all HTTP headers and the error response so Google can easily reproduce it without using DNOA.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre


Dave Wharton

unread,
Jan 9, 2013, 8:21:13 PM1/9/13
to DotNetOpenAuth
Hi Andrew

I know it has been a while since I last asked about this, but I just noticed trying different versions of DNOA (looking at something totally different) that I didn't get this error when using version 4.1.2 and 4.1.3, but I do get it in 4.1.0 and 4.1.4. 

Is there something that has changed in 4.1.4 that could have resulted in seeing this error again? It could be that it is still an issue with Google of course and 4.1.2 was not calling something it should be etc., but I thought I would ask out of curiosity.

Thanks again!

Cheers,
Dave

Andrew Arnott

unread,
Jan 12, 2013, 10:14:31 AM1/12/13
to dotnetopenid, Dave Wharton
If you’re still referring to the error from the https://www.google.com/accounts/o8/user-xrds?uri=http:%2F%2Fsomegoogledomain.com%2F URL, that really seems simple enough that it would be hard to imagine how DNOA could be messing that up. If you could use Fiddler to get the raw request of one that works and one that doesn’t and include it in a follow up email that may be very helpful in diagnosing this problem.
 
I can’t think of any reason 4.1.4 would have regressed this behavior off hand.
Reply all
Reply to author
Forward
0 new messages