MVC 6 Windows Server 2012 R2 IIS 8.5-错误:无法加载应用程序或执行命令"Microsoft.AspNet.Server.Kestrel" [英] MVC 6 Windows Server 2012 R2 IIS 8.5 - Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'

查看:176
本文介绍了MVC 6 Windows Server 2012 R2 IIS 8.5-错误:无法加载应用程序或执行命令"Microsoft.AspNet.Server.Kestrel"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试将MVC 6/ASP.NET 5应用程序部署到IIS时,我收到错误消息

When trying to deploy a MVC 6/ASP.NET 5 application to IIS I get the error

错误:无法加载应用程序或执行命令'Microsoft.AspNet.Server.Kestrel'.可用命令:web,ef.

Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web, ef.

在标准输出日志文件中.

in the stdout log file.

我使用Visual Studio 2015发布了该应用程序,如果直接在命令提示符下调用web.cmd,它可以正常运行.

I published the application using Visual Studio 2015 and it runs ok if I call web.cmd directly in a command prompt.

我的project.json文件看起来像

My project.json file looks like

{
  "userSecretsId": "aspnet5-H3CustomerPortal-2b9cfc76-487a-41dc-a29f- c81e45251c25",
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
    "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0- rc1-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
    "Microsoft.Extensions.Configuration": "1.0.0-rc1-final"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

  "frameworks": {
    "dnx451": {
    }
  },

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean",  "gulp   min" ]
  }
}

运行时是dnx-clr-win-x64.1.0.0-rc1-update1,服务器是带有IIS 8.5的Windows Server 2012 R2.我已经安装了HTTP平台处理程序1.2.要在IIS中工作还需要安装其他工具吗?还是需要设置的任何其他配置/环境变量? 任何帮助,将不胜感激. 谢谢

The runtime is dnx-clr-win-x64.1.0.0-rc1-update1, the server is Windows Server 2012 R2 with IIS 8.5. I have installed the HTTP platform handler 1.2. Is there anything else that needs installed for this to work in IIS? Or any additional configuration/environment variables that need set? Any help would be appreciated. Thanks

推荐答案

本文中的解决方案有效

The solution from this post worked Problems publishing asp vnext website on IIS 8 i.e. ASP 4.5 wasn't installed, to install it go to Server Manager , Add Roles and Features, Web Server IIS / Web Server / Application Development and check ASP .NET 4.5 and .NET Extensibility 4.5

这篇关于MVC 6 Windows Server 2012 R2 IIS 8.5-错误:无法加载应用程序或执行命令"Microsoft.AspNet.Server.Kestrel"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆