2010-03-10 2 views

답변

1

web.config를 통해 다른 파일과 동일한 방식으로 피드를 보호 할 수 있습니다. 의 라인을 따라 뭔가 :

<configuration> 
    <system.web> 
    <authentication mode="Forms"> 
     <forms name=".AUTH" loginUrl="login.aspx" protection="All" timeout="60"> 
     <credentials passwordFormat="MD5"> 
      <user name="admin" password="" /> 
     </credentials> 
     </forms> 
    </authentication> 
    <authorization> 
     <allow users="?" /> 
     <allow users="*" /> 
    </authorization> 
    </system.web> 

    <location path="feed.xml"> 
    <system.web> 
     <authorization> 
     <allow users="admin" /> 
     <deny users="*" /> 
     </authorization> 
    </system.web> 
    </location> 
</configuration> 
1

당신이 컨트롤러 액션이 다음 [Authorize] 속성과 행동의 결과를 장식 내장 인증을 사용하는 경우 :

[Authorize (Users="List of users", Roles="List of roles")] 
RssActionResult RssFeed(params) 
{ 
}