2011-12-11 159 views
1

我必須使用護照tpe身份驗證來驗證用戶身份。爲此,我在web.config中設置了以下配置。護照身份驗證

<identity userName="username" password="password" impersonate="true"/> 

<authentication mode="Passport"> 
      <passport redirectUrl="https://login.yahoo.com"/> 
     </authentication> 

請確認這是否正確/完整?

回答

0

您可以指定這樣

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.web> 
     <compilation defaultLanguage="c#" debug="true" /> 
     <authentication mode="Passport"> 
      <passport redirectUrl="login.aspx" /> 
     </authentication> 
     <authorization> 
      <allow users="*" /> <!-- Allow all users --> 
     </authorization> 
    </system.web> 
    <location path="attendees"> 
     <system.web> 
      <authorization> 
      <deny users="?" /> 
      </authorization> 
     </system.web> 
    </location> 
</configuration> 

我建議你請看一看這個authentication using passport mode