目录
报错:缺少api-ms-win-crt-runtime-l1-1-0.dll
无法访问注册表Access to the registry key is denied
之前部署在Windows Server 2016上很正常没有什么问题
但是在2012 R2上部署失败(503),网上搜查后,发现要按照下面的顺序配置服务器
安装Windows操作系统补丁
Download Windows Server 2012 R2 更新 (KB2919355) from Official Microsoft Download Centerhttps://www.microsoft.com/zh-CN/download/details.aspx?id=42334安装顺序:clearcompressionflag.exe、KB2919442、KB2919355、KB2932046、KB2959977、KB2937592、KB2938439、KB2934018
安装过程中需要多次重启服务器!
安装VC_Redist
安装.net6的Hosting Bundle
IIS新增网站
略
IIS配置应用程序池
1、选择网站的应用程序池》基本设置》.net clr版本修改为无托管代码
2、 选择网站的应用程序池》高级设置》启用32位应用程序改为true
报错:缺少api-ms-win-crt-runtime-l1-1-0.dll
安装补丁KB2999226
无法访问注册表Access to the registry key is denied
代码通过Registry.CurrentUser.CreateSubKey来创建注册表时报错
IIS应用程序池,找到你的应用程序池
右键“高级设置”=》“进程模型”=》“加载用户配置文件” 改为“True”
然后重启这个应用程序池