帮助:如何在 ASP.NET 开发服务器上启用 Windows 身份验证? [英] Help: How to enable Windows Authentication on ASP.NET Development Server?

查看:22
本文介绍了帮助:如何在 ASP.NET 开发服务器上启用 Windows 身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望你们中的任何人都知道如何解决我们遇到的这个问题.

I hope any of you guys knows how to fix this issue we are having.

我们正在尝试通过网络托管 WCF 服务.我们将 web.config 设置为服务需要 Windows 身份验证.我们遇到的问题如下:

We are trying to host a WCF service via the web. We set the web.config to have the service require windows authentication. The problem we are having is the following:

当我们在常规 IIS 中托管我们的服务时,该服务运行良好并且Windows 身份验证"模式没有问题.但是,当我们尝试从我们的开发人员框中运行它时,我们收到以下错误:此服务的安全设置需要 Windows 身份验证,但没有为托管此服务的 IIS 应用程序启用它."

When we host our service in a regular IIS, the service runs fine and there is no issues with the "Windows Authentication" mode. However, when we try to run it from our developer boxes we get the following error: "Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service."

我们的开发人员盒子不是通过常规 IIS 托管服务,而是通过 Visual Studio 的 APS.NET 开发服务器托管服务.我们尝试进入 web 项目属性并说启用 NTLM 身份验证,但这仍然没有解决它.有谁知道如何修理它?VS ASP.NET 开发服务器甚至支持 Windows 身份验证吗?使用 Windows 身份验证托管服务的唯一选择是使用 IIS 而忘记 ASP.NET 开发服务器吗?

Our developers boxes are not hosting the service through the regular IIS but rather through Visual Studio's APS.NET Development Server. We tried going into the web project properties and said to enable NTLM authentication but that still did not fix it. Does anyone know how to fix it? Does VS ASP.NET Development Server even support Windows Authentication? Is the only option for hosting the service with Windows Authentication is to use IIS and forget about ASP.NET Development Server?

谢谢查克

推荐答案

为了配置 IIS Express 安全设置:

In order to configure IIS Express security settings:

  1. 在任务栏(系统托盘)中查找 IIS express 符号.
  2. 右键单击并选择所有应用程序".
  3. 点击您想要更改的站点名称(虽然我相信更改是站点范围的)
  4. 单击下面配置部分中的路径(它将打开 applicationhost.config 文件)
  5. 搜索身份验证部分并进行更改

可以在此处找到示例更改:

Example changes can be found here:

http://toadcode.blogspot.ca/2011/08/security-config-in-iis-express.html

这篇关于帮助:如何在 ASP.NET 开发服务器上启用 Windows 身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆