1
votes

I'm doing a WPF application that requires an OAuth login so I'm using a WebBrowser Control to make the authentication part. When I navigate to the login page everything works fine and the page is rendered correctly.

When I fill my credentials and click the login button the request for the next page in the login process runs ok but the next page is displayed as text and not rendered.

i.e.

<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://use.typekit.net/ezx0eeb.js"></script>
<script type="text/javascript">
    try {
        Typekit.load();
    } catch (e) {
    }
</script>
<link rel="stylesheet"
    href="https://s3-us-west-2.amazonaws.com/jive-static/jivestrap/1.0/jivestrap.min.css">
...etc..

Image of html not being rendered

I'm already setting the Internet Explorer compatibility registry key value to allow my app to render everything in ie9 mode.

RegistryKey myKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true);
if (myKey != null) {
  myKey.SetValue(System.AppDomain.CurrentDomain.FriendlyName, 9999);
}

Any ideas? Thanks

1
I am not sure why it would be doing that, I would love to see any code you have in a github gist that I could use to reproduce the issue in my local environment. - Alexander Ryan Baggett
But I would right-click on the page where it appears to be displaying the HTML as text instead and see if I can click view source and see if there is something else wrapping the Html tags. - Alexander Ryan Baggett
Can you show the code for the login button and related <a> tag so that we can see what you are clicking on exactly? If the login button is an input on a form, I would like to see the code for the form too. - Alexander Ryan Baggett
I'll prepare a sample tomorrow. today I didn't have enough free development time to do that - Pedro Figueiredo

1 Answers

1
votes

The problem was that the second Jive authentication page was sending the data with the content type application/x-ms-application. I'll be contacting Jive support to figure out why is the sending that HTTP header.