ASP.NET - directly login to gmail  ASP.NET - directly login to gmail

Asked By goldy gupta
26-Apr-11 01:47 AM
Helo to all I am making an asp.net web application..
I wants that user can login directly from my application to his gmail account. I saved html page of gmail and make the button click through javascript..


But when the button click the msg is coming

"Your browser's cookie functionality is turned off. Please turn it on. "

How to fix that problem I tried almost in all browser
  James H replied to goldy gupta
26-Apr-11 01:48 AM

If you're seeing a message that your browser's cookie functionality is turned off, it's possible that your browser's cookies are not enabled.

First-party cookies are cookies that are set by the site domain listed in the address bar. Third-party cookies come from other domain sources that have items, such as ads or images, embedded on the page. Depending on your browser, you can control which types of cookies you allow.

Turning cookies on

Microsoft Internet Explorer

To enable cookies in Internet Explorer 7 or 8:

  1. Click Start > Control Panel. (With Windows XP Classic View, click the Windows Start button > Settings > Control Panel).
  2. Double-click the Internet Options icon.
  3. Select the Privacy tab.
  4. Click Advanced.
  5. Select "Override automatic cookie handling" under the "Cookies" section in the Advanced Privacy Settings window.
  6. Select the "Accept" or "Prompt" option under "First-party Cookies."
  7. Select the "Accept" or "Prompt" option under "Third-party Cookies." (If you select the "Prompt" option, you'll be asked for approval every time a website attempts to send you a cookie.)
  8. In the Internet Options window, click OK to exit.

To enable cookies in Internet Explorer 6:

  1. Click Start > Control Panel. (With Windows XP Classic View, click the Windows Start button > Settings > Control Panel).
  2. Click Advanced.
  3. Select "Override Automatic Cookie Handling."
  4. Select the "Accept" or "Prompt" option under "First-party Cookies."
  5. Select the "Accept" or "Prompt" option under "Third-party Cookies." (If you select the "Prompt" option, you'll be asked for approval every time a website attempts to send you a cookie.)
  6. In the Internet Options window, click OK to exit.

Mozilla Firefox

To enable cookies in Mozilla Firefox 3.x for Windows:

  1. Click Tools > Options.
  2. Click Privacy in the top panel.
  3. Set "Firefox will:" to Use custom settings for history.
  4. Check the box next to "Accept cookies from sites" to enable cookies.
  5. Click OK.

To enable cookies in Mozilla Firefox 2.x for Windows:

  1. Click Tools > Options.
  2. Click Privacy in the top panel.
  3. Select the checkbox labeled "Accept cookies from sites."
  4. Click OK.

To enable cookies in Mozilla Firefox for Mac:

  1. Go to the Firefox drop-down menu.
  2. Select Preferences.
  3. Click Privacy.
  4. Set "Firefox will:" to Use custom settings for history.
  5. Check the box next to "Accept cookies from sites" to enable cookies.
  6. Click OK.

Chrome

To enable cookies in Chrome for Windows:

  1. Click the Tools menu.
  2. Select Options.
  3. Click the Under the Hood tab.
  4. Click Content settings in the "Privacy" section.
  5. Select Allow local data to be set to allow both first-party and third-party cookies. If you only want to accept first-party cookies, check the box next to "Block all third-party cookies without exception."

To enable cookies in Chrome for Mac:

  1. Select Chrome > Preferences on the menu bar.
  2. Click the Under the Hood tab.
  3. Click Content settings in the "Privacy" section.
  4. Select Allow local data to be set to allow both first-party and third-party cookies. If you only want to accept first-party cookies, check the box next to "Block all third-party cookies without exception."

Safari

To enable cookies in Safari:

  1. Go to the Safari drop-down menu.
  2. Select Preferences.
  3. Click Security in the top panel.
  4. Under "Accept Cookies" select Only from sites you navigate to.

Still seeing issues after turning cookies on

If cookies in your browser are enabled and you're still seeing an error message that your browser's cookie functionality is turned off, try opening a new window in your browser. Sometimes a browser's cookies will not work properly when you are using multiple tabs in a browser window.

If this does not help, you can also http://www.google.com/support/accounts/bin/answer.py?answer=32050
  James H replied to goldy gupta
26-Apr-11 01:50 AM
Login areas on OpenTable require that your browser accept cookies. (A cookie is a small amount of information that is sent to your browser from a Web server and stored on your computer's hard drive.) We use cookies to remind us of who you are and to verify that you're properly signed in.

Please use the appropriate directions below to take full advantage of our website functionality.

Internet Explorer 7.x - Windows
1. Open Internet Explorer
2. Select Internet Options from the Tools menu
3. Click on the Privacy tab
4. Click on the Advanced button
5. Mark both checkboxes that appear and select Accept under First Party Cookies
6. Click OK

Internet Explorer 6.x - Windows
1. Open Internet Explorer
2. Select Internet Options from the Tools menu
3. Click on the Privacy tab
4. Under Websites, click the Edit button
5. Enter www.opentable.com into the Address of Website field and click Add
6. Click "OK"

Firefox 3.x - Windows/Mac
1. Open Firefox
2. Click on Options from the Tools menu (Mac: Click on Preferences from the Firefox menu)
3. Click on the Privacy image along the top
4. Under Cookies, check the Accept cookies from this site box or alternatively add the OpenTable website by clicking on Exceptions, entering www.opentable.com, and clicking the Allow button
5. Click OK

Safari 4.x
1. Open Safari
2. Click the Settings Icon
3. Click Preferences
4. Click on the Security tab
5. Under Accept Cookies, choose "Always"
6. Close the Preferences Dialog Box

Safari 3.x - Mac
1. Open Safari
2. Click the Edit Menu
3. Click Preferences
4. Click on the Security tab
5. Click Allow Cookies
6. Close the Preferences Dialog Box

Chrome 2.x - Windows
1. Open Chrome
2. Click on the wrench icon in the upper-right of the browser window
3. Click on the Under the Hood tab
4. Under Cookie Settings select Allow All Cookies
5. Click OK

Please be aware that a cookie cannot spread computer viruses, retrieve any other data from your hard drive, or capture your email address. OpenTable respects your privacy, and we maintain your profile information on a secure server. OpenTable does not authorize any other use of your confidential information.
  Ravi S replied to goldy gupta
26-Apr-11 01:51 AM
Hi

Method 1
------------------------------------------------------------------------------------------------------
// using System.Net.Mail;
Mailmessageage message = new Mailmessageage();
message.From = new MailAddress("User@gmail.com", "Your DisplayName");
message.To.Add(new MailAddress("To@gmail.com")); // the email you want to send email to
message.Subject = "A test email"

message.IsBodyHtml = true;
message.BodyEncoding = System.Text.Encoding.UTF8;
message.Body = "this is just a simple test!<br> Jack"
message.Priority = MailPriority.High;

SmtpClient client = new SmtpClient("smtp.gmail.com", 587); // 587;//Gmail port
client.Credentials = new System.Net.NetworkCredential("User@gmail.com", "*****"); // Your user name & password
client.EnableSsl = true; //ssl
object userState = message;
try
{
client.Send(message);
Response.Write("To " + message.To.ToString() + "<br>");
}
catch (Exception ee)
{
Response.Write(ee.messageage + "<br>" + ee.InnerException.messageage);
}

Method 2
------------------------------------------------------------------------------------------------------

// using System.Net.Mail;
MailMessage message = new MailMessage();
message.From = new MailAddress("User@gmail.com");

message.To.Add(new MailAddress("to@gmail.com"));

message.Subject = "This is my subject"
message.Body = "This is the content"
SmtpClient client = new SmtpClient();
client.EnableSsl = true;

try
{
client.Send(message);
Response.Write("To " + message.To.ToString() + "<br>");
}
catch (Exception ee)
{
Response.Write(ee.Message );
}

//In web.config

<system.net>
<mailSettings>
<smtp from="from@gmail.com">
<network host="smtp.gmail.com" port="587" userName="User@gmail.com" password="your pwd" />
<!-- if has 'defaultCredentials="true"' , using Gmail can not send success -->
</smtp>
</mailSettings>
</system.net>

Hope this helps you...

  Ravi S replied to goldy gupta
26-Apr-11 01:53 AM
HI

Refer this link ,here is an example
http://stackoverflow.com/questions/46663/how-do-you-send-email-from-a-java-app-using-gmail
  Riley K replied to goldy gupta
26-Apr-11 01:54 AM

If you're receiving an error message that says, Your browser's cookie functionality is turned off. Please turn it on:

  1. Open Internet Explorer, and click Tools along the top of your browser window.
  2. Select Internet Options... and click the Content tab at the top of the dialogue box. If the Content Advisor is enabled, please disable it.
  3. Click OK.

Next, please clear your browser's cache. To clear your cache in IE:

In Internet Explorer 6.x:

  1. Log out of Gmail. Close all other open browser windows.
  2. Click the Tools menu at the top of your browser, and select Internet Options.
  3. Click the General tab at the top of the dialogue box.
  4. Click Delete Files under Temporary Internet files.
  5. Select Delete all offline content by checking the box.
  6. Click OK.

In Internet Explorer 7:

  1. Log out of Gmail and close all other open browser windows.
  2. Click Tools > Internet Options.
  3. Select the General tab.
  4. Click Delete under Browsing History.
  5. Under Temporary Internet Files, click Delete Files.
  6. Click Delete Cookies.
  7. Click OK.

In Internet Explorer 8:

  1. Log out of Gmail and close all other open browser windows.
  2. Click Tools > Delete private browsing history.
  3. Click the box next to 'Temporary Internet files' and 'Cookies.'
  4. Click Delete.
  Mihir Soni replied to goldy gupta
26-Apr-11 02:06 AM
Hello,

you can not do in this way directly but for that you have to use google authentication I mean

there are three ways to do authentication to google use google api please follow the below link for more inomration 

http://code.google.com/apis/accounts/docs/AuthForWebApps.html


Create New Account
help
Hello all, i like to setup a fast clonable test / development installation of MOSS2007 under Windows 2008 SP1 (not R2) (32bit). As starting point I have choosen the Blog post from OWSTIMER.EXE, onetnative.dll) 03 / 04 / 2010 13:53:04.95 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Topology 0 Medium Diagnostics settings: 32768 03 / 04 / 2010 13:53:05.38 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Topology 9e7d Medium Initializing the configuration database connection. 03 / 04 / 2010 13:53 11.35 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880i High System.Data.SqlClient.SqlException: Die von der Anmeldung angeforderte 'SharePoint_07_Config AttemptOneLogin(ServerInfo serverInfo, Strin. . . 03 / 04 / 2010 13:53:11.35* OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880i High . . .g newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) bei System Data.SqlClient.SqlConnectionFactory.CreateConn. . . 03 / 04 / 2010 13:53:11.35* OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880i High . . .ection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) bei DbConnectionFactory connectionFactory) bei Sys. . . 03 / 04 / 2010 13:53:11.35* OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880i High . . .tem.Data.SqlClient.SqlConnection.Open() bei Microsoft.SharePoint.Utilities.SqlSession.OpenConnection() 03 / 04 / 2010 13:53:11.35 OWSTIMER.EXE (0x0980) 0x0988 Windows SharePoint Services Database 880j High SqlError: 'Die von der Anmeldung angeforderte 'SharePoint_07_Config'-Datenbank kann nicht
Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731] [0 information blocks from 'res: / / ClientAccessPreConfig.xml' [11 / 17 / 2011 19:14:14.0386] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml the server.). [11 / 17 / 2011 19:14:14.0479] [1] Executing: if($RoleInstallWindowsComponents) { # Install any Windows Roles or Features required for the Client Access role Install-WindowsComponent -ShortNameForRole "CAS" -ADToolsNeeded $RoleADToolsNeeded information blocks from 'res: / / AllRolesPreSetupLastComponent.xml' [11 / 17 / 2011 19:15:28.0550] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml information blocks from 'res: / / AllRolesPreFileCopyComponent.xml' [11 / 17 / 2011 19:15:28.0706] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml MSExchangeADTopologyService, 1484, msftesql, 1532, svchost, 1552, SMSvcHost, 1576, Setup, D: \ Setup.EXE 1576, Setup, C: \ Windows \ SYSTEM32 \ ntdll.dll 1576, Setup, C: \ Windows \ system32 \ kernel32.dll 1576, Setup, C: \ Windows \ system32 \ KERNELBASE.dll 1576, Setup, C: \ Windows \ system32 \ ADVAPI32.dll 1576, Setup, C: \ Windows \ system32
Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731] [0 information blocks from 'res: / / ClientAccessPreConfig.xml' [11 / 17 / 2011 19:14:14.0386] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml the server.). [11 / 17 / 2011 19:14:14.0479] [1] Executing: if($RoleInstallWindowsComponents) { # Install any Windows Roles or Features required for the Client Access role Install-WindowsComponent -ShortNameForRole "CAS" -ADToolsNeeded $RoleADToolsNeeded information blocks from 'res: / / AllRolesPreSetupLastComponent.xml' [11 / 17 / 2011 19:15:28.0550] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml information blocks from 'res: / / AllRolesPreFileCopyComponent.xml' [11 / 17 / 2011 19:15:28.0706] [1] Loaded 7 parameters from the configuration file "F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ bin \ EnterpriseServiceEndpointsConfig.xml MSExchangeADTopologyService, 1484, msftesql, 1532, svchost, 1552, SMSvcHost, 1576, Setup, D: \ Setup.EXE 1576, Setup, C: \ Windows \ SYSTEM32 \ ntdll.dll 1576, Setup, C: \ Windows \ system32 \ kernel32.dll 1576, Setup, C: \ Windows \ system32 \ KERNELBASE.dll 1576, Setup, C: \ Windows \ system32 \ ADVAPI32.dll 1576, Setup, C: \ Windows \ system32
addded to it. public partial class Form1 : Form { private static int pageNumber = 4; private System.Windows.Forms.CheckBox tab2CheckBox3; private System.Windows.Forms.CheckBox tab2CheckBox2; private System.Windows.Forms.CheckBox tab2CheckBox1; private System.Windows.Forms.RadioButton tabRadioButton; private System.Windows.Forms.RadioButton tab1Radio1Button1; private System.Windows.Forms.RadioButton tab2Radio2Button2; private System Windows.Forms.RadioButton tab3Radio3Button3; private System.Windows.Forms.RadioButton tab4Radio4Button4; private System.Windows.Forms.RadioButton tab5Radio5Button5; private System.Windows.Forms.RadioButton tab6Radio6Button6