1

I am trying to launch chrome, directed at a web site that requires user credentials. I am trying to set up a program that can plug in user credentials automatically, but when I run this it opens the page but there is a black background with an unhappy face icon in the upper left. I am using C# to do this. At the bottom of this message is a code snippet of what I am doing:

    public void LaunchBrowser()
    {
        var startInfo = new ProcessStartInfo
                            {
                                FileName = SelectedBrowser.FilePath,
                                UserName = SelectedUser.UserName,
                                Password = SelectedUser.PasswordSecured,
                                Domain = "****.com",
                                Arguments = SelectedEnvironment.Server,
                                UseShellExecute = false,
                            };
        Process.Start(startInfo);
    }

Can you tell me why this is showing up dark (blank)? And do I need to change a configuration setting to allow a user name and password to be passed through to the page?

Thanks!

-Andrew

Rjeymonk
  • 23
  • 4
  • What does your file path look like? – timothyclifford Dec 08 '15 at 15:43
  • 1
    I don't think this is where you want to add your username/password as these are what will be used to launch the browser process rather than the website itself. When you say the website requires credentials, what sort are these? Is it something like Kerberos or NTLM or is it a login form? – timothyclifford Dec 08 '15 at 15:47
  • @timothyclifford - the file path is: FilePath = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", When I run this pointed to Internet Explorer it works properly. In Internet Explorer I have the Automatic logon set in the User Authentication section of the Settings. – Rjeymonk Dec 08 '15 at 15:48
  • Thanks, can you explain what you're using all the other `ProcessStartInfo` properties for? Have you tried just loading it with `FileName` and `Arguments` to ensure these are valid? – timothyclifford Dec 08 '15 at 15:54

1 Answers1

0

UserName and Password refer to Windows credentials that are used to launch the process; not HTTP credentials that are sent to the web server. You are unlikely to have much luck launching an external web browser and passing credentials in the HTTP headers. Some workarounds are in this question.

Community
  • 1
  • 1
Tim Rogers
  • 21,297
  • 6
  • 52
  • 68