Click here to Skip to main content
12,949,083 members (58,279 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am creating code to open website in 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 = ""
        Dim username As String = "Username"
        Dim password As New System.Security.SecureString
 Dim plainPassword As String = "password"
        For Each c In plainPassword.ToCharArray
        Next c
          Process.Start("C:\Program Files\Internet Explorer\iexplore.exe", "", username, password, domain)
Posted 16-Dec-12 20:13pm
Updated 16-Dec-12 20:16pm
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

Rate this: bad
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
smiths3 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
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,330
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web01 | 2.8.170524.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2017
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