【发布时间】:2016-04-23 09:14:05
【问题描述】:
我有一个网站在我的本地 IISExpress 上运行良好,但是当我将它上传到 Azure 时,它非常缓慢并且经常返回错误:The specified CGI application encountered an error and the server terminated the process
在 project.json 中,我有(除其他外)这些依赖项:
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNet.Hosting": "1.0.0-*",
还有这些命令:
"commands": {
"web": "MyApp",
},
我的 hosting.json 文件有:
{
"server": "Microsoft.AspNet.Server.Kestrel"
}
我的 Startup.cs 有:
public class Startup
{
public IConfigurationRoot Configuration { get; set; }
public static void Main(string[] args)
{
var application = new WebApplicationBuilder()
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
.UseStartup<Startup>()
.Build();
application.Run();
}
//etc...
我是否应该使用 Kestrel?我没有针对任何非 Windows 平台,所以我只对 IISExpress 和 Azure 感兴趣。
【问题讨论】:
标签: asp.net azure iis kestrel-http-server asp.net-core