天天看点

【小5聊】Windows Server 2008 R2 IIS部署 MVC

在服务器2008部署 IIS MVC,默认IIS只安装了v2.0,没有v4.0,一般无法运行到MVC

1、默认IIS只要V2.0

除非项目版本不高于v2.0,不过大部分MVC肯定都要v4.0才支持

【小5聊】Windows Server 2008 R2 IIS部署 MVC

 2、安装v4.0

以管理员权限运行cmd

  • 64位系统

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

  • 32位系统 

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe–i

3、未找到路径,可能是没有安装v4.0

点击下载

【小5聊】Windows Server 2008 R2 IIS部署 MVC
  • 安装失败处理方法

net stop WuAuServ

SoftwareDistribution,这个文件名更改一下,重新启动后会自动创建

net start WuAuServ

【小5聊】Windows Server 2008 R2 IIS部署 MVC
  • 如果还不行,那么升级SP1

KB976902

找了几小时才找到,好多地址都失效了 

【小5聊】Windows Server 2008 R2 IIS部署 MVC
【小5聊】Windows Server 2008 R2 IIS部署 MVC
【小5聊】Windows Server 2008 R2 IIS部署 MVC
【小5聊】Windows Server 2008 R2 IIS部署 MVC
  • 安装前
【小5聊】Windows Server 2008 R2 IIS部署 MVC

4、再重新cmd上面的路径

5、一般版本如下

v4.0.30319,点击下载

【小5聊】Windows Server 2008 R2 IIS部署 MVC
【小5聊】Windows Server 2008 R2 IIS部署 MVC

6、安装.net framework,再如下操作

【小5聊】Windows Server 2008 R2 IIS部署 MVC
【小5聊】Windows Server 2008 R2 IIS部署 MVC

继续阅读