密码保护ATOM供稿 [英] Password protecting ATOM feeds

查看:359
本文介绍了密码保护ATOM供稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twitter的ATOM供稿要求您的登录名和密码(明显),这是很好的支持IE7(IE7显然不能处理RSS与登录饲料/ PW)。即当您注册进显示一个简单的登录提示。

The Twitter ATOM feed requires your login and password (obviously), which is nicely supported by IE7 (apparently IE7 can't handle RSS feeds with login/pw). IE displays a simple login prompt when you register the feed.

我如何在ASP.NET中实现类似的东西不访问服务器或IIS?

How do I implement something similar in ASP.NET without access to the server or IIS?

推荐答案

您可以手动发送一个头与一些基本的ASP请求一般的HTTP认证。

You could send a header manually with some basic ASP to request generic http authentication.

<%
AUTHUSER = TRIM(Request.ServerVariables(AUTH_USER))
IF = AUTHUSERTHEN
Response.Status =401没有获得许可
Response.AddHeaderWWW身份验证,基本境界=SUPEREXPERT
到Response.End
万一
%>

<% authUser = TRIM( Request.ServerVariables( "AUTH_USER" ) ) IF authUser = "" THEN Response.Status = "401 Not Authorized" Response.AddHeader "WWW-Authenticate", "Basic Realm=""SUPEREXPERT""" Response.End END IF %>

(抄自: http://psacake.com/web/fl.asp

您也可以在你的web.config中定义身份验证设置,如果你使用asp.net

You could also define authentication settings in your web.config if you're using asp.net

&LT;! - Web.config文件 - >
&LT; system.web>中
   &LT;身份验证模式=基本/>
&LT; /system.web>

<!-- Web.config file --> <system.web> <authentication mode="basic" /> </system.web>

这篇关于密码保护ATOM供稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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