簡體   English   中英

認證asp.net MVC 4內部網

[英]authentification asp.net MVC 4 intranet

我正在嘗試使用IIS Express構建我的第一個ASP.NET MVC 4,Intranet應用程序。 但是當我使用此配置運行默認項目時:

 <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <authentication mode="Windows" />
    <authorization>
      <deny users="?" />
    </authorization>

Web應用程序需要用戶名和密碼才能訪問。 請問我在哪里找到的? 我該如何配置?

提前感謝!

您可以使用以下配置來允許某些用戶而無需登錄:

<authorization>
  <allow users="user1,user2,...,userN" />
  <deny users="*" />
</authorization>

其中,user1,user2到userN是要真正登錄的用戶的名稱(無需輸入任何密碼)。 如果要讓所有用戶自動登錄,則應遵循Wiktor的建議,並閱讀他在評論中粘貼的文章: http : //www.wiktorzychla.com/2012/06/iis-75-integrated-security-with -no.html

由於您的身份驗證模式為Windows <authentication mode="Windows" /> ,因此應針對服務器上的Windows用戶帳戶進行身份驗證。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM