Web站点配置 [英] web site configuration

查看:198
本文介绍了Web站点配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个网站,由我(开发商)和一个用户(域名\\用户名)。访问

One web site is required to be accessed by me (developer) and one user (DOMAIN_NAME\USER_NAME).

当我使用自动主机的创建VS开发的Visual Studio网站,在web.config中进行以下设置足够:

When I developed web site in visual studio using "automatic host" created by VS, the following settings in web.config were enough:

<authentication mode="Windows"/>
<authorization>
  <allow users="DOMAIN_NAME\my_name,DOMAIN_NAME\USER_NAME" />
  <deny users="*" />
</authorization>

但是,当我在IIS中创建网站,我收到错误:

But when I created web site in IIS I'm receiving error:

访问被拒绝。

说明:访问服务此请求所需的资源时出错。服务器可能不被配置为访问所请求的URL。

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

错误消息:401.2未经授权:登录失败,服务器配置。验证您是否有权查看根据您提供的凭据和Web服务器上启用的身份验证方法该目录或页面。获取更多帮助联系Web服务器的管理员。

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

什么设​​置ApplicationPoolIdentity和网站本身需要被指定?

What setting for ApplicationPoolIdentity and web site itself are required to be specified?

非常感谢!

编辑:

我已经配置应用程序池的IIS的本地使用本地系统的身份,网站 - 使用传递认证,并作为残疾人建议匿名身份验证,启用Windows身份验证 - 和网站在本地成为可行的。

I've configured Application Pool of local IIS to use 'LocalSystem' identity, web site - to use "pass-through" authentication, and as suggested disabled "Anonymous Authentication", enabled "Windows Authentication" - and web site locally became workable.

不过,当地我的Windows 7(IIS7),但在TEST环境(在这里我需要部署的网站),我有Windows 2008服务器,它并没有选项可启用Windows身份验证......唐知道为什么......可能是管理员的更高的水平,但我是管理员组的成员...

But locally I have windows 7 (IIS7), but on "TEST" environment (where I need to deploy web site) I have windows 2008 server and it doesn't have option to enable "Windows Authentication"... don't know why... probably that is for higher level of administrator, but I'm a member of Administrators group...

猜,我做错了什么......

Guess, I'm doing something wrong...

请指教。

推荐答案

您web.config中设置正确。此外,确保IIS网站/应用程序配置为:

Your web.config is set up properly. Further, ensure the IIS site/app is configured as:


  • 要不要允许匿名访问

  • 强制集成Windows身份验证

  • 将应用程序池以网络服务

IIS7

  • ensure you have the Windows Authentication security feature installed in Roles & Features.
  • In IIS7, go to the IIS or Features View, double-click Authentication.
  • On the Authentication page, select Windows Authentication
  • On the Authentication page, disable Anonymous Authentication
  • MSDN article

IIS6

查找下面的对话框在


  • 控制面板/管理工具 - > IIS管理器 - >右键单击Web站点 - >属性 - >目录安全性

这篇关于Web站点配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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