IIS Http 500.19 error

https://halfblood.pro/the-horrible-story-of-publishing-net-core-web-apps-for-beginners-6121662dd8c4

 

The Half-Blood Programmer

Stories from Lex Li on technologies.

Blog All posts About LeXtudio Inc.

The Horrible Story of Publishing .NET Core Web Apps For Beginners

June 15, 2018

Copyright © Lex Li. Snow covered ladder in Quebec City.

Generally speaking, ASP.NET Core is cool, and the recent 2.1 release is even cooler with all kinds of new goodies. However, this post is not aiming to praise Microsoft on what they do the best, but the worst currently for ASP.NET Core/IIS beginners.

To assist you identifying the typical issues, now Jexus Manager has ASP.NET Core Diagnostics,

Figure 1: ASP.NET Core Diagnostics in Jexus Manager

Famous Issue 1: ASP.NET Core Module on IIS

I cannot recall when Microsoft decided to make ASP.NET Core module for IIS a second installer (out of .NET Core SDK for Windows). So whenever a developer gets familiar with .NET Core with merely the SDK installed on Windows, and attempts to publish the binaries for IIS to host, BOMB, a famous 500.19 error page happens.

Figure 2: IIS 500.19 error.

The Error Code field must be 0x8007000d.

If the Error Code field was 0x80070005, the application pool identity has no access to the web content folder, which you should fix by granting the permissions.

It has been discussed so many times over the internet, and you can always find beginners on ASP.NET Core puzzled that in fact they need to install something extra for IIS. Of course, Microsoft makes it very clear by stating it in the official documentation.

But,

  • ASP.NET Core module is part of IIS Express, which makes it super natural that people expect it to be part of IIS.
  • ASP.NET Core module is not part of the SDK for Windows, and not part of Visual Studio.

Therefore, if a new developer comes and tries, he/she won’t be able to know what to acquire and install easily, unless the error page shows at the last minute.

Note that you also need to update ASP.NET Core module to match the actual runtime, as ASP.NET Core 2.2 introduced ASP.NET Core module v2, which is different from v1.

Famous Issue 2: Framework Dependent Deployment vs. Self Contained Deployment

Again, Microsoft makes very clear documentation.

But it is still not easy for beginners to hit this page and fully understand the concepts. Thus, when they ship binaries from one machine to another, there is still possibility that the apps can break, if

  • FDD is used.
  • The runtime is not installed on the target machine.

Clearly, the developer must know that the runtime ought to be installed separately for FDD.

Famous Issue 3: Where To Configure HTTPS

Ideally you should install the certificate on the reverse proxy server (IIS/Apache/nginx). Then the browser/reverse proxy connection is HTTPS enabled, while the reverse proxy/Kestrel connection can be HTTP.

I think of course the latter can be configured as HTTPS enabled as well, but it would take your some time to figure out how to.

Possible Solution

I don’t know if there can be a complete solution to address both issues, but personally I believe the following might help a little bit,

  • Let dotnet publish generates a warning message after execution.
  • Let Visual Studio publishing wizard displays a similar warning message after execution.
  • If FDD is used, warn the developers that the .NET Core runtime is a must on the target machine as a separate installation.
  • If the target platform is Windows, warn the developers that ASP.NET Core module for IIS can be mandate (if they do host on IIS).

What would you suggest then?

All rights reserved. © Lex Li, 2005-2022

Advertisement

You might like

Show Comments/Add Comments

     

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值