IIS7.5 的安装以及配置

来源:互联网 发布:win10以太网连接网络3 编辑:程序博客网 时间:2024/05/21 18:46

http://blog.163.com/kele_lipeng/blog/static/813452782010102692351327/原来地址

一、安装IIS

默认情况下,windows7安装时是不会自动安装iis,只能手动安装。

1.安装IIS 7.5

Control Panel一Programs and Features一Turn Window featrues on or off

2.如图选择安装

windows7 iis - await - await

VS2005 中,如果要调试站点的话,必须有“Windows Authentication”

“Digest Authentication” 是使用 Windows 域控制器对请求访问 Web 服务器上内容的用户进行身份验证。


“Basic Authentication” 是要求用户提供有效的用户名和密码才能访问内容。

要调试 ASP.net 当然要安装IIS支持 ASP.net 的组件了。

二、配置IIS7
1、IIS7 在安装了上述组件后,在Administrative Tools(管理工具)出现了IIS Manager图标,打开运行。如下图:

windows7 iis - await - await

2、双击内页中的ASP,即显示ASP的设置内容,",然后在"Behavior(行为)"组中将"Enable Parent Paths(启用父路径)"设置为True即可。

windows7 iis - await - await

3、配置默认网站

windows7 iis - await - await

4、填写site name( 网站名称)、physical path(网站目录路径)、Application Pool,点OK即可

windows7 iis - await - await

IIS 的应用程序池根据托管管道模式分了两种类型:集成和经典
集成 .NET 模式下,应用程序不应在 <system.web>/<httpModules> 配置节中指定 ASP.NET 模块组件,而应使用 <system.webServer>/<modules> 配置节来加载 ASP.NET 模块组件。
经典 .NET 模式 则是我们以前习惯的IIS 6 的方式,没有上述限制。


但是如果这个时候你在右键预览某一网页(xxx.aspx)的时候出现如下的错误:


“/”应用程序中的服务器错误。

配置错误
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。
分析器错误消息: 在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。如果在 IIS 中没有将虚拟目录配置为应用程序,则可能导致此错误。
源错误:
de>
行 141:            ASP.NET to identify an incoming user. 行 142:        -->行 143:  <authentication mode="Forms">行 144:   <forms timeout="30"></forms>行 145:  </authentication>
de>
源文件: D:\Flex\GuangJie\guangjieserverweb\web.config 行: 143

这个问题的解决办法就是:Open "IIS Manager", right click the directory and select "Convert to Application"->

windows7 iis - await - await

You can keep the default settings or adjust the settings of the web application here. Press "OK"

windows7 iis - await - await

You will now see the web application with a small globe next the directory name instead of a folder this indicates it’s a web application

windows7 iis - await - await

Now when we browse to the /billing directory we no longer get the error.

windows7 iis - await - await

*最重要的一点是 单击右键 [将虚拟目录转换成应用程序].

* 将C:\Windows\Temp目录的权限配置为User/IIS_User有完全控制权限

原创粉丝点击