Click here to Skip to main content
15,851,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

VB
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
Updated 16-Dec-12 21:16pm
v2
Comments
Ashok19r91d 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

Should that %3D be there?
are you URLEncoding the &tab parameter value?
maybe that should be &tab=wm instead of &tab=%3Dwm
 
Share this answer
 
Comments
dcba1 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900