Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I am creating code to open website in vb.net and passing the use name and password to that site. But I got error " Logon failure: unknown user name or bad password"
 
This is my code. What's wrong in that
 
Dim domain As String = "google.com"
        Dim username As String = "Username"
        Dim password As New System.Security.SecureString
 Dim plainPassword As String = "password"
        For Each c In plainPassword.ToCharArray
            password.AppendChar(c)
        Next c
          Process.Start("C:\Program Files\Internet Explorer\iexplore.exe", "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/?tab%3Dwm&scc=1&ltmpl=default&ltmplcache=2", username, password, domain)
Posted 16-Dec-12 20:13pm
dcba1890
Edited 16-Dec-12 20:16pm
v2
Comments
Ashok19r91d at 17-Dec-12 2:40am
   
I'm not Sure with this technology, But as a Suggestion,
If Your code is Right and Not working means Be sure You have Disabled 2 Step Verification (or) You're Using Application Specific Password to Login

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Should that %3D be there?
are you URLEncoding the &tab parameter value?
maybe that should be &tab=wm instead of &tab=%3Dwm
  Permalink  
Comments
smiths3 at 19-Dec-12 0:34am
   
without user name and password that code works fine. But when I enter password and username it throws error. I want to copy username and password from from my application to website login page

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,649
1 Sergey Alexandrovich Kryukov 6,270
2 CPallini 5,190
3 George Jonsson 3,574
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100