一.安装IIS与其他基础模块

1.进入操作系统“控制面板\所有控制面板项\程序和功能”,如图:

asp.net 网站性能工具 asp.net 5.0_IIS

2.点击“启用或关闭Windows功能”,选择【Internet information Services】和【Internet information Services 可承载的Web核心】菜单中的选中项,如图:

asp.net 网站性能工具 asp.net 5.0_Web_02

3.点击【确定】,Windows功能开始下载并安装已选功能的程序,直到出现“Windows已完成请求的更改”,IIS安装成功。

4.在服务器上安装可能有些偏差;

asp.net 网站性能工具 asp.net 5.0_IIS_03


二.发布Web程序

1.Web程序可以输出成应用程序或者控制台程序,如图:

asp.net 网站性能工具 asp.net 5.0_Windows_04

2.Web程序开发完可以进行发布,如图:

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_05

asp.net 网站性能工具 asp.net 5.0_Windows_06

3.发布成功之后后生成一个publish文件夹。

asp.net 网站性能工具 asp.net 5.0_Windows_07

4.先从管理工具中找到IIS管理;

asp.net 网站性能工具 asp.net 5.0_Windows_08

5.将WebApi部署组件全部安装下去,按照顺序安装;

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_09

6.新建立一个网站

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_10

7.修改应用程序的参数;

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_11

asp.net 网站性能工具 asp.net 5.0_Windows_12

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_13

8.调用WebApi的Get方法。

asp.net 网站性能工具 asp.net 5.0_IIS_14

三.可能出现的问题

1.在IIS服务中启动站点的时候提示错误"万维网发布服务(w3svc)已停止,除非万维网发布服务(w3svc)正在运行;

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_15

2.解决方法,右键点击iis全局设置,如果是停止状态那么点击启动即可.

asp.net 网站性能工具 asp.net 5.0_asp.net 网站性能工具_16