clobba / open-webkit-sharp

Automatically exported from code.google.com/p/open-webkit-sharp
GNU Lesser General Public License v3.0
0 stars 0 forks source link

NTLM Authentication doesn't work #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. wkb1.Username = "user";
2. wkb1.Password = "password";
3. wkb1.Navigate("http://ntlm.securesite.com");
4. Authentication never happens.

What is the expected output? What do you see instead?
It returns 401 Authentication Required error.

What version of the product are you using? On what operating system?
2.8 on Windows7 32 bit. Visual Studio 2010.

Please provide any additional information below.
I fixed the problem: When I trace the requests through proxy and did 
authentication, i received headers provided in 1.txt (attachment) and when i 
tried the same with browser i received headers provided in 2.txt. Both are 
same. Just a minor difference. Open-Webkit-sharp code has something else in 
place of " " (space) in file WebKitBrowser.cs

Line number: 1842
request.setValue("Basic " + 
Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(string.Format("{0}:{1
}", Username, Password))), "Authorization");
                       ^

I deleted that and added space, and now its working. :)

Jaydeep

Original issue reported on code.google.com by jaydipd...@gmail.com on 12 May 2012 at 8:55

GoogleCodeExporter commented 8 years ago
Thanks for this solution! I will add it to the source! Issue remains opened 
until a new version is released

Original comment by tsumalis96@gmail.com on 14 May 2012 at 2:14

GoogleCodeExporter commented 8 years ago
Thanks. Now the authentication works but DocumentCompleted event doesn't seem 
working after the page gets loaded. I will look into this.

Original comment by jaydipd...@gmail.com on 14 May 2012 at 2:32