我正在尝试启用
Windows身份验证以在本地开发,根据标题:
> Windows 8(专业版) > VS2012 > IISExpress > ASP.Net MVC4项目 > Orchard CMS是项目(但我不认为这是相关的)
通过项目属性,我将Windows身份验证设置为已启用,并将匿名身份验证设置为已禁用.
在web.config我设置:
<authentication mode="Windows" />
但是,在运行该站点时,我不断提示输入凭据.输入Windows 8或本地帐户凭据似乎没有任何区别,我已将这些帐户设置为对该文件夹具有完全权限.
任何建议都感激不尽!
更新1: 正如Darin Dimitrov所建议的,我创建了一个空白的MVC项目并选择了Intranet模板.将匿名授权设置为禁用并启用Windows身份验证后,此测试项目完全按预期工作(输入时提示输入凭据可提供对站点的访问权限).我将相同的授权配置应用到我的Orchard项目web.config:
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
但仍然没有快乐,我按照预期提示输入凭据,但我输入的内容似乎并未授权用户.我已经对下面的两个web.conf进行过贴牌,以防有人能指出我缺少的东西吗?
> Orchard Web.Config:http://pastie.org/private/8oe5jesvt0vmqgyn3w >示例Web.Config:http://pastie.org/private/zgxyue03crzd6fb8umlidq
解决方法
确保已在Web服务器的属性中启用了Windows身份验证并禁用了匿名身份验证:
还要确保您已阅读使用Intranet模板创建新MVC应用程序时为您生成的文本文件:
In order to use the Intranet template,you’ll need to enable Windows authentication and disable Anonymous authentication.
IIS 7 & IIS 8
- Open IIS Manager and navigate to your website.
- In Features View,double-click Authentication.
-
On the Authentication page,select Windows authentication. If Windows authentication is not an option,you’ll need to make sure Windows authentication is installed on the server. To enable Windows authentication on Windows: a) In Control Panel open “Programs and Features”. b) Select “Turn Windows features on or off”. c) Navigate to Internet Information Services > World Wide Web Services > Security and make sure the Windows authentication node is checked. To enable Windows authentication on Windows Server: a) In Server Manager,select Web Server (IIS) and click Add Role Services b) Navigate to Web Server > Security and make sure the Windows authentication node is checked.
-
In the Actions pane,click Enable to use Windows authentication.
- On the Authentication page,select Anonymous authentication.
- In the Actions pane,click Disable to disable anonymous authentication.
IIS Express
- Click on your project in the Solution Explorer to select the project.
- If the Properties pane is not open,open it (F4).
- In the Properties pane for your project: a) Set “Anonymous Authentication” to “Disabled”. b) Set “Windows Authentication” to “Enabled”.
(编辑:4S站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|