标签 IIS 下的文章

IIS(Internet Information Services)版本 与其对应的 Windows 操作系统 版本列表:

IIS 版本Windows 版本备注
IIS 10.0Windows Server 2019 / 2022
Windows 10 (版本 1607+) / Windows 11
支持 HTTP/2、TLS 1.3(后期更新)
IIS 8.5Windows Server 2012 R2
Windows 8.1
包含动态站点压缩、ETag 改进等
IIS 8.0Windows Server 2012
Windows 8
支持 SNI(服务器名称指示)、WebSocket 等
IIS 7.5Windows Server 2008 R2
Windows 7
集成 PowerShell 管理、最佳化配置
IIS 7.0Windows Server 2008
Windows Vista
模块化架构、集成 .NET 支持
IIS 6.0Windows Server 2003
Windows XP Professional x64 Edition
引入应用程序池、XML 配置支持
IIS 5.1Windows XP Professional桌面版 IIS,功能受限
IIS 5.0Windows 2000 Server支持 ASP、FTP 隔离等
IIS 4.0Windows NT 4.0 Option Pack通过 NT 4.0 的附加包安装
IIS 3.0Windows NT 4.0 Service Pack 3引入 ASP 支持
IIS 2.0Windows NT 4.0基础 Web 服务器功能
IIS 1.0Windows NT 3.51最初版本,功能简单

关键说明:

  1. 服务器与客户端区别

    • Windows Server 版本中的 IIS 功能完整,支持多站点、应用程序池等。
    • Windows 客户端(如 Win10/Win11)的 IIS 主要用于开发/测试,有并发连接数限制(通常 10 个)。
  2. IIS 10 版本细分

    • IIS 10.0 在 Windows Server 2016 初版引入,Windows Server 2019/2022 和 Win10 (1607+) 中持续更新。
    • HTTP/2 在 IIS 10(Windows Server 2016 及 Win10)中默认启用。
  3. 生命周期

    • 较旧的 IIS 版本(如 6.0、7.0)已随对应 Windows 系统结束支持,建议升级到受支持的版本。

  • 安装“WebDAV 发布”
  • 启用 WebDAV 并添加创作规则
  • 添加创作规则
  • “身份验证”开启“Windows 身份验证”
  • "授权"账户

用C#开发的一个程序,在本地环境运行正常,但部署到服务器一直报错:
请求被中止: 未能创建 SSL/TLS 安全通道。

先用常规方法:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;

不行,再加这行:

ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
    return true;
};

也不行。

升级.net framework,还是不行。
服务器操作系统是2019,应该不至于是版本太低的原因。

最后找到这个软件:IISCrypto 执行后完美解决问题。

在IIS环境下部署前端应用时,可以使用以下Url重写规则:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="rule1">
                    <match url="^([\w\-\/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="index.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

起因是想在服务器上安装SVN Server,选择的是SVN Server,这软件好像只支持http(s)协议,没有SVN协议,好吧,就不折腾了。在安装时选择端口号时又凌乱了,不想暴露那么多端口号,就打算用IIS的反射代理来实现。

这里记录一下设置IIS反向代理的操作步骤:

  • 先安装以下两个软件:
    Application Request Routing
    URL Rewrite
    其实你安装第一个ARR时时,会自动安装Url Rewrite,因为它依赖后者。
  • 在IIS里设置Application Request Routing Cache,打开Server Proxy Setting,选择以下:
    Enable Proxy -> YES
    Keep alive -> YES
    Reverse rewrite host in response headers -> NO
  • 在IIS里新建一个网站
  • 在网站中设置URL Rewrite:

      <rule name="svn" stopProcessing="true">
          <match url="(.*)" />
          <action type="Rewrite" url="http://localhost:81/{R:1}" />
      </rule>