问题描述
打开远程网址,通过asp.net进行基本身份验证,
我已完成代码,如
InternetExplorer IEControl = new InternetExplorer();
IWebBrowserApp webBrowserCtl =(IWebBrowserApp)IEControl;
string strAuthenticationHeader =Authorization:Basic+ Convert.ToBase64String(Encoding.Default .GetBytes(用户名+:+密码))+\\\\ n;
webBrowserCtl.Visible = true;
webBrowserCtl.Navigate(** url **,null,null,null,strAuthenticationHeader);
允许我只在Internet Explorer中打开页面,在新网页中,我希望它支持所有浏览器和页面都应导航到同一网页中的新网址
任何人都可以帮忙...... ????
Open remote url webpage with Basic authentication by asp.net,
I have done code like
InternetExplorer IEControl = new InternetExplorer();
IWebBrowserApp webBrowserCtl = (IWebBrowserApp)IEControl;
string strAuthenticationHeader = "Authorization: Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(username + ":" + password)) + "\r\n";
webBrowserCtl.Visible = true;
webBrowserCtl.Navigate(**url**, null, null, null, strAuthenticationHeader);
which allowing me to open page in internet explorer only and in new webpage, I want it to support on all browsers and page should navigate to new url in same web page
Can any one help...????
推荐答案
这篇关于asp.net中的基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!