IIS使用Tip

1. IIS7 HTTPS 绑定主机头 

IIS7下面默认HTTPS绑定是无法指定主机头的,但我们可以通过手工修改IIS配置来实现主机头绑定。

打开C:Windowssystem32inetsrvconfigapplicationHost.config

定位到如下位置:

                <bindings>
                    <binding protocol="https" bindingInformation="*:443" />
                    <binding protocol="net.tcp" bindingInformation="808:*" />
                    <binding protocol="net.pipe" bindingInformation="*" />
                    <binding protocol="net.msmq" bindingInformation="localhost" />
                    <binding protocol="msmq.formatname" bindingInformation="localhost" />
                    <binding protocol="http" bindingInformation="*:80:www.console.com" />
                </bindings>

找到https的配置项目,修改为:

<binding protocol="https" bindingInformation="*:443:www.console.com" />

注意这里的www.console.com要换成你自己的域名,之后保存即可。

2.error-unable-to-access-the-iis-metabase

http://stackoverflow.com/questions/12859891/error-unable-to-access-the-iis-metabase

3. machineKey元素配置

https://msdn.microsoft.com/zh-cn/library/w8h3skw9(v=vs.85).aspx

4.IIS网站隔一段时间再次访问网站缓慢的问题

原因:IIS的线程回收机制导致放置若干长时间,空闲的进程被回收了

解决方法:打开应用程序池的高级设置,设置回收-固定时间间隔(分钟)为0,设置进程模型-闲置超时(分钟)为0

5.iis虚拟目录或应用程序不继承父站点的web.config配置信息

A为主站点

B为A的应用程序站点

再A的web.config中对不想继承的节点用location 套起来。如下:

 <location path="." allowOverride="true" inheritInChildApplications="false">
    <appSettings>.....</appSettings>
    <connectionStrings>....</connectionStrings>
    <system.web>.....</system.web>
 </location>
原文地址:https://www.cnblogs.com/ldybyz/p/5940839.html