<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>asp.net google ile login olmak | SanalData | Yazılım ve Teknoloji Haberleri Sitesi</title>
	<atom:link href="https://www.sanaldata.com/e/asp-net-google-ile-login-olmak/feed" rel="self" type="application/rss+xml" />
	<link>https://www.sanaldata.com</link>
	<description>Yazılım ve teknoloji üzerine her türlü makaleye ulaşabileceğiniz site</description>
	<lastBuildDate>Mon, 20 Jun 2022 05:51:07 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.sanaldata.com/wp-content/uploads/2016/11/cropped-logo-32x32.png</url>
	<title>asp.net google ile login olmak | SanalData | Yazılım ve Teknoloji Haberleri Sitesi</title>
	<link>https://www.sanaldata.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Asp.net Gmail İle Login Olmak</title>
		<link>https://www.sanaldata.com/asp-net-gmail-ile-login-olmak</link>
					<comments>https://www.sanaldata.com/asp-net-gmail-ile-login-olmak#respond</comments>
		
		<dc:creator><![CDATA[Burak]]></dc:creator>
		<pubDate>Mon, 20 Jun 2022 05:51:07 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[asp.net google ile login olmak]]></category>
		<category><![CDATA[asp.net google ile üye girişi]]></category>
		<category><![CDATA[asp.net webforms gmail login]]></category>
		<category><![CDATA[asp.net webforms google ile login olmak]]></category>
		<guid isPermaLink="false">https://www.sanaldata.com/?p=2235</guid>

					<description><![CDATA[<p>Merhabalar, Asp.net &#8216;de gmail yani google hesabınızı kullanarak üye girişi veya login alanı yapmak isterseniz. Burdan direk örnek kodu indirebilirsiniz.Kodlaması ise aşağıdaki gibidir. Html [crayon-69f437fdaf1ba634115025/] Codebehind tarafı [crayon-69f437fdaf1c4824460290/] Bir sonraki konuda görüşünceye kadar bol sorgulu günler 🙂</p>
The post <a href="https://www.sanaldata.com/asp-net-gmail-ile-login-olmak">Asp.net Gmail İle Login Olmak</a> first appeared on <a href="https://www.sanaldata.com">SanalData | Yazılım ve Teknoloji Haberleri Sitesi</a>.]]></description>
										<content:encoded><![CDATA[<p>Merhabalar,</p>
<p>Asp.net &#8216;de gmail yani google hesabınızı kullanarak üye girişi veya login alanı yapmak isterseniz. <a href="https://www.sanaldata.com/wp-content/uploads/2022/06/Google_Login.zip"><strong>Burdan</strong></a> direk örnek kodu indirebilirsiniz.Kodlaması ise aşağıdaki gibidir.</p>
<p><strong>Html</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="CS.aspx.cs" Inherits="CS2" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;style type="text/css"&gt;
        body
        {
            font-family: Arial;
            font-size: 10pt;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
        &lt;asp:Button ID="btnLogin" Text="Login" runat="server" OnClick="Login" /&gt;
        &lt;asp:Panel ID="pnlProfile" runat="server" Visible="false"&gt;
            &lt;hr /&gt;
            &lt;table&gt;
                &lt;tr&gt;
                    &lt;td rowspan="6" valign="top"&gt;
                        &lt;asp:Image ID="ProfileImage" runat="server" Width="50" Height="50" /&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        ID:
                        &lt;asp:Label ID="lblId" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        Name:
                        &lt;asp:Label ID="lblName" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        Email:
                        &lt;asp:Label ID="lblEmail" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        Verified Email:
                        &lt;asp:Label ID="lblVerified" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;
                        &lt;asp:Button Text="Clear" runat="server" OnClick="Clear" /&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/asp:Panel&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p><strong>Codebehind tarafı</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Net;
using System.IO;
using ASPSnippets.GoogleAPI;
using System.Web.Script.Serialization;

public partial class CS2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GoogleConnect.ClientId = "&lt;Google Client ID&gt;";
        GoogleConnect.ClientSecret = "&lt;Google Client Secret&gt;";
        GoogleConnect.RedirectUri = Request.Url.AbsoluteUri.Split('?')[0];

        if (!this.IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["code"]))
            {
                string code = Request.QueryString["code"];
                string json = GoogleConnect.Fetch("me", code);
                GoogleProfile profile = new JavaScriptSerializer().Deserialize&lt;GoogleProfile&gt;(json);
                lblId.Text = profile.Id;
                lblName.Text = profile.Name;
                lblEmail.Text = profile.Email;
                lblVerified.Text = profile.Verified_Email;
                ProfileImage.ImageUrl = profile.Picture;
                pnlProfile.Visible = true;
                btnLogin.Enabled = false;
            }
            if (Request.QueryString["error"] == "access_denied")
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('Access denied.')", true);
            }
        }
    }

    protected void Login(object sender, EventArgs e)
    {
        GoogleConnect.Authorize("profile", "email");
    }
    protected void Clear(object sender, EventArgs e)
    {
        GoogleConnect.Clear(Request.QueryString["code"]);
    }

    public class GoogleProfile
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public string Picture { get; set; }
        public string Email { get; set; }
        public string Verified_Email { get; set; }
    }
}</pre><p>Bir sonraki konuda görüşünceye kadar bol sorgulu günler <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>The post <a href="https://www.sanaldata.com/asp-net-gmail-ile-login-olmak">Asp.net Gmail İle Login Olmak</a> first appeared on <a href="https://www.sanaldata.com">SanalData | Yazılım ve Teknoloji Haberleri Sitesi</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.sanaldata.com/asp-net-gmail-ile-login-olmak/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
