【问题标题】:CGI errors when hosting on Azure在 Azure 上托管时出现 CGI 错误
【发布时间】: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


    【解决方案1】:

    我必须从免费/共享升级到 B1 实例。显然,部署期间的包对于免费/共享设置来说太大了。

    【讨论】:

      猜你喜欢
      • 2018-05-28
      • 2017-02-21
      • 2020-10-12
      • 2016-05-24
      • 1970-01-01
      • 2018-05-31
      • 2018-03-19
      • 2020-06-23
      • 1970-01-01
      相关资源
      最近更新 更多