如何强制与当地asp.net开发服务器的Windows身份验证? [英] How do I force windows authentication with local asp.net development server?
问题描述
我发展,需要Windows身份验证的ASP.NET应用程序。我有web.config中设置为拒绝匿名用户使用Windows模式进行身份验证,但我的本地开发版仍然让我的权利通过到现场。为了测试不同的用户设置窗口,我需要强制授权,这样我就可以改变用户。
如何设置我的系统(配置文件,VS2005设置,IIS等?)来强制授权窗口时,我的本地asp.net开发服务器上运行的网站上弹出?换句话说,我怎么运行在调试模式下时,现场的验证弹出?
您还需要配置IIS和你的应用程序指向IIS,而不是本地Web服务器
要配置Windows身份验证
- 启动Internet Information Services(IIS)。
- 右键单击应用程序的虚拟目录,然后单击属性。
- 单击目录安全性选项卡。
- 在匿名访问和验证控制,单击编辑。
- 确保匿名访问复选框未选中,并且集成Windows>认证是唯一选中的复选框。
块引用>http://msdn.microsoft.com/en-us/library/ ms998358.aspx
要配置应用程序指向IIS
- 右键点击你的Web项目,然后单击属性
- 点击网页标签
- 单击使用本地IIS Web服务器单选按钮
I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set up to deny anonymous users and use Windows mode for authentication, but my local development version still lets me pass right through to the site. In order to test different user set-ups, I need to force authorization so I can change users.
How do I set up my system (config files, VS2005 settings, IIS, etc?) to force the authorization window to popup on the site when I'm running on local asp.net development server? In other words, how do I get the authentication popup when running the site in Debug mode?
解决方案You will also need to configure IIS and have your application point to IIS instead of the local web server
To configure Windows authentication
- Start Internet Information Services (IIS).
- Right-click your application's virtual directory, and then click Properties.
- Click the Directory Security tab.
- Under Anonymous access and authentication control, click Edit.
- Make sure the Anonymous access check box is not selected and that Integrated Windows > authentication is the only selected check box.
http://msdn.microsoft.com/en-us/library/ms998358.aspx
To configure your application to point to IIS
- Right click on your web project, and then click Properties
- Click the Web tab
- Click the "Use Local IIS Web Server" radio button
这篇关于如何强制与当地asp.net开发服务器的Windows身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!