IIS发布自动回收等问题
一、自动回收问题,应用程序池配置(两个都需配置)
1、闲置时间间隔设置为0
2、闲置超时设置为0
参考:http://bibaoke.com/post/66
http://furion.baiqian.ltd/docs/deploy-iis#3415-iis-%E5%9B%9E%E6%94%B6%E9%97%AE%E9%A2%98%E5%92%8C%E9%85%8D%E7%BD%AE
二、接口Delete/Put等请求405问题(二选一)
1、Delete/Put等类型的请求会出现405,原因是IIS开启了WebDAVModule模块,在iis的模块里删除即可
2、在配置文件里添加
<system.webServer> <modules> <remove name="WebDAVModule" /> </modules> </system.webServer>
三、卷影(无占用)复制发布替换(热更新)
1、web.config文件添加如下配置
<?xml version="1.0" encoding="utf-8"?> <configuration> <!-- To customize the asp.net core module uncomment and edit the following section. For more info see https://go.microsoft.com/fwlink/?linkid=838655 --> <system.webServer> <handlers> <remove name="aspNetCore"/> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModulev2" resourceType="Unspecified"/> </handlers> <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"> <handlerSettings> <handlerSetting name="experimentalEnableShadowCopy" value="true" /> <handlerSetting name="shadowCopyDirectory" value="../ShadowCopyDirectory/" /> <!-- Only enable handler logging if you encounter issues--> <!--<handlerSetting name="debugFile" value=".\logs\aspnetcore-debug.log" />--> <!--<handlerSetting name="debugLevel" value="FILE,TRACE" />--> </handlerSettings> </aspNetCore> </system.webServer> </configuration>
参考:http://furion.baiqian.ltd/docs/deploy-iis#3416-%E5%8D%B7%E5%BD%B1%E6%97%A0%E5%8D%A0%E7%94%A8%E5%A4%8D%E5%88%B6%E5%8F%91%E5%B8%83%E6%9B%BF%E6%8D%A2