CefSharp加载使用浏览器登录页面 [英] CefSharp load a page with browser login

查看:6881
本文介绍了CefSharp加载使用浏览器登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在以别一个WPF应用程序的Web浏览器,我试着用工具箱中的一个,但得到一些问题,去CefSharp。

I need to ebed a web browser in a Wpf app, I tried with the one from the toolbox but get some issues and went to CefSharp.

public MainWindow()
{
 InitializeComponent();
 BrowserSettings settings = new BrowserSettings();
 Cef.Initialize(new CefSettings());           
CefSharp.Wpf.ChromiumWebBrowser webBrowser = new CefSharp.Wpf.ChromiumWebBrowser();
  licence_grid.Children.Add(webBrowser);
  webBrowser.Address = "http://myurlToLoad the page";
}

问题是,当我用正常的URL页面加载。
但是,当我使用url我打算用蒙山和出用户在浏览器中输入自己的用户名和密码自动弹出(我的意思是不是从网站上弹出)。我得到这个页面的错误采取柳太多的时间来加载,没有别的。
有人可以给我一些曲目跟着...
谢谢

The problem is when I used a normal url the page load. But when I used the url I intend to use and whith which the user enter his user and password in a browser pop up (I mean not a pop up from the website) . I get an error with this page take yoo much time to load and nothing else. Can someone give me some tracks to follow... Thanks

推荐答案

这听起来像你指的是弹出实际上是在网站提示基本认证。

It sounds like the popup you are referring to is in fact the site prompting for basic authentication.

在这种情况下,你需要提供一个<一个href=\"https://groups.google.com/forum/?nomobile=true#!searchin/cefsharp/IRequestHandler.GetAuthCredentials/cefsharp/oCLeWUwdiEw/L7WNkbR4neMJ\"相对=nofollow> IRequestHandler.GetAuthCredentials 处理程序。

In that case you need to provide an IRequestHandler.GetAuthCredentials handler.

这篇关于CefSharp加载使用浏览器登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆