简体   繁体   中英

C# .net 4.0 WPF Webbrowser is not natively reading IE 11 cookies when navigating to URI's

I am making an app where I use a WPF WebBrowser control to navigate to a url.

When the page loads I see the home page as a guest... (a user who is not logged in).

However if I launch IE 11 and navigate to the page, I am already logged in.

How do I get the WebBrowser control to see the cookies from IE 11? So I do not have to login again?

Note: I was under the impression that when you set FEATURE_BROWSER_EMULATION registry key to your "appName" and "IEVersion" (in my case "myApp","11001") that it would natively share a persistent instance of IE 11, thus inheriting the cookies...

Possibly the answer to this post: WebBrowser control in web server not returning Cookie from Website

might give you some insight. If you have permission to set FEATURE_BROWSER_EMULATION in the registry on your server this should work. If you don't it may be that you cannot change the handling of cookies without modifying the Internet Zone registry entry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM