Download the DotNetOpenAuth from here. First of all make a new website and add a reference to DotNetOpenAuth.dll.
Drag and drop a button on page.
<asp:Button ID="btnLoginToGoogle" Runat="server" Text="Google Login" OnCommand="OpenLogin_Click"
CommandArgument="https://www.google.com/accounts/o8/id"
Font-Bold="True" Font-Italic="True" Width="162px" />
using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.RelyingParty;
protected void Page_Load(object sender, EventArgs e)
{
OpenIdRelyingParty OIDRP = new OpenIdRelyingParty();
var str = OIDRP.GetResponse();
if (str != null)
{
switch (str.Status)
{
case AuthenticationStatus.Authenticated:
NotLoggedIn.Visible = false;
Session["GoogleIdentifier"] = str.ClaimedIdentifier.ToString();
Response.Redirect("Home.aspx");
break;
case AuthenticationStatus.Canceled:
lblMessage.Text = "Cancelled.";
break;
case AuthenticationStatus.Failed:
lblMessage.Text = "Login Failed.";
break;
}
}
}
protected void OpenLogin_Click(object src, CommandEventArgs e)
{
string str = e.CommandArgument.ToString();
OpenIdRelyingParty openid = new OpenIdRelyingParty();
var b = new UriBuilder(Request.Url) { Query = "" };
var req = openid.CreateRequest(str, b.Uri, b.Uri);
req.RedirectToProvider();
}
Now run the website. 
Image 1
When you click on Login button.
Image2.
Insert google email and password. 
Image3.

sathyaPosted Jul 21, 2013, 2:23 AM
hi..i have download the googlelogin rar file and run in my local system..i got Line 18: <authentication mode="Forms"> this error please suggest me and how to integrate my website ? please very urgent
duc nguyeneditedPosted Nov 29, 2012, 10:02 AMEdited Nov 29, 2012, 10:03 AM
thank you! this is helpful for me http://phattrienweb.com
aaaaa aaaaaPosted Nov 25, 2011, 6:07 AM
but when i login login and password then the status come login failed why my email id is [email protected] please help me
chamika fernandoPosted Mar 11, 2011, 7:04 AM
Hi this is Nice Article. Additionally i need to get the information from google account to my application.
Rajeev KPosted Dec 2, 2010, 9:05 AM
My hosting windows server doesnot have the component "dotnetopenauth" installed with it. Thus i am unable to use this dotnetopenauth OpenID features. Can anyone suggest a windows server (asp classic) having dotnetopenauth component.
shaik mohiuddinPosted Nov 3, 2010, 4:40 AM
Hai Nice Article Iam getting an error when i run the application Error: No OpenID endpoint found
Sandesh DaddiPosted Nov 2, 2010, 3:22 AM
Hi nice article, I have requirement of fetch the data from Google WebMaster toolkit, google is not exposing any API for that, so I have to login to Google Webmaster Toolkit and search download link and then I am sending request to that URL using WinInet.dll methods, How I am doing this is, I am creating a webbrowser control on server side in one thread and then navigating through that browser to my required page, then calling WinInet.dll methods to get required files, I am using winInet since I am not able to directly invoke that download link, since it has some security token, Here at my machine and server every thing is working fine except when I run this application as an "Admin" but in my production environment I am not allowed to run my application under admin rights because of security issue, my question is Can I use OpenID or similar kind of mechanism to login to the Google and get the download link your help is appreciated thanks Sandesh http://www.sanshark.com