views:

180

answers:

1

I am trying to set up OpenID on an ASP.Net 2 website that I am making right now, and using DotNetOpenAuth. But it seems I've run into a brick wall that won't budge no matter how many things I try.

While trying to sign-in with Google I am getting "Web request to 'https://www.google.com/accounts/o8/ud' failed." as response.

The weird thing is that Google displays the sign-in screen correctly which asks me to confirm whether I want to give the site access.

Additionally the sign-in data from Google is correctly being appended to the querystring.

So why isn't OpenID.GetResponse able to fetch me the correct data?

I can potentially get the sign-in data from the querystring myself. But is that a good idea?

Thank you for replying!

Edit: Just want to clarify here that the behaviour is on Localhost.

+1  A: 

If your web server is behind a firewall or requires a proxy to make outbound HTTP requests, make sure your web.config file includes a snippet to use the system default proxy (or a specifically named one.

<system.net>
    <defaultProxy enabled="true" />
</system.net>

And no don't just retrieve the sign-in data from the query string yourself. There's lots of validation that has to be done on that string to avoid anyone being able to log in as anyone just by writing up the query string themselves. In fact it sounds like DotNetOpenAuth is failing during verification, so you're not likely to be able to do it yourself either until this outbound HTTP request problem is solved.

The tricky part here is why DNOA was able to send you to Google, but unable to contact Google later to verify the positive assertion. Can you enable logging and add the logs to your question if what I've shown above doesn't work?

Andrew Arnott
Hi Andrew. I was hoping for a reply from you. The default proxy is already enabled. Yes, I will enable logging and post a log.
Cyril Gupta
Additionally the DotNetOpenAuth MVC sample project is working fine and receiving data correctly on my machine. Is DNOA using Sessions to keep information between requests? I think the problem could also be in my web.config.
Cyril Gupta
DNOA does *not* use sessions. Just a shot: try adding `<trust level="Medium" originUrl=".*"/>` to your web.config file. Otherwise, we'll need to see the logs.
Andrew Arnott
I haven't been able to solve this issue yet.
Cyril Gupta
Include logs, please.
Andrew Arnott