asp.net中的基本身份验证 [英] Basic Aithentication in asp.net

查看:116
本文介绍了asp.net中的基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打开远程网址,通过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中的服务器上创建InternetExplorer对象?这根本不会奏效,根本没有意义。
I guess you need to really go back to the design board and decide what you want to do.

Are you seriously creating InternetExplorer object on server in ASP.Net? That would never work and does not make sense at all.


这篇关于asp.net中的基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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