{"id":617,"date":"2013-10-23T18:43:59","date_gmt":"2013-10-23T16:43:59","guid":{"rendered":"http:\/\/mattiesworld.gotdns.org\/weblog\/?p=617"},"modified":"2013-10-23T18:43:59","modified_gmt":"2013-10-23T16:43:59","slug":"internet-explorer-basic-authentication-automation","status":"publish","type":"post","link":"https:\/\/mattiesworld.gotdns.org\/weblog\/2013\/10\/23\/internet-explorer-basic-authentication-automation\/","title":{"rendered":"Internet Explorer basic authentication automation"},"content":{"rendered":"<p>At work I tried setting a custom header (for example for basic authentication) when navigating the internet explorer activex component using OLE automation. I didn&#8217;t find much info on the web, so I post it here as a reminder.<\/p>\n<p>Setting custom headers is in fact supported by the navigate method on the IWebBrowser2 interface as stated in the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa752093(v=vs.85).aspx\">msdn<\/a>: simply supply a 5th element. For example, in java it looks something like this:<br \/>\n<code>invoke(\"Navigate\", new Variant[]{<br \/>\nnew Variant(url),<br \/>\nnew Variant(),<br \/>\nnew Variant(),<br \/>\nnew Variant(),<br \/>\nnew Variant(\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")<br \/>\n});<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work I tried setting a custom header (for example for basic authentication) when navigating the internet explorer activex component using OLE automation. I didn&#8217;t find much info on the web, so I post it here as a reminder. Setting custom headers is in fact supported by the navigate method on the IWebBrowser2 interface as &hellip; <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2013\/10\/23\/internet-explorer-basic-authentication-automation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Internet Explorer basic authentication automation<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-617","post","type-post","status-publish","format-standard","hentry","category-programming","category-windows"],"_links":{"self":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/comments?post=617"}],"version-history":[{"count":1,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/617\/revisions"}],"predecessor-version":[{"id":618,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/617\/revisions\/618"}],"wp:attachment":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/media?parent=617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/categories?post=617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/tags?post=617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}