ASP.Net Core App to IIS subfolder



Having trouble publishing your .net core app to a subfolder?
Make sure to double check if you’ve:
1.) Converted that subfolder into an application via IIS Manager.
2.) Created and assigned a new Application Pool. (No CLR, choose No managed code)

As someone who’s worked in a Linux server environment for over a decade, basic things like this was an annoying obstacle. At the end, everything I read and studied to find this resolution will become new knowledge.

Oh yeah..and I wish I could change the display language to English, but this VPS hosting service doesn’t have the pack included with the image. Screenshot is in Japanese, but you get the point.

ASP.Net Coreで初めてのAPIが完成して喜んでいたけれど、サブディレクトリへパブリッシュしたらerror 500が出た。Unix環境がメインだった俺には、Windows Serverはまだまだ未知。いじるのは遥かに簡単だけれど、細かい仕様がまだわからない。そんなんで、自分のプログラム側の問題かと思ったりして解決策見つかるまで10時間近くかかったという。それまでフォーラム読みまくって、色々試した知識は無駄にはならない!

解決方法:
1.) IISマネージャー内でアプリを起動させるフォルダを右クリックして、アプリケーションへ変換。
2.) 新しいアプリケーションプールを作成してから、指定のフォルダへ設定。(CLRバージョンを選ばずにマネージドコードなし)

First REST Web API

今日は基本機能しかないAPIだけど、RESTful web APIをプログラムできた。
身内で使う予定のアプリに必要だったから、第1ステップ完了。

Thanks to the loads of resources online, I was able to finish my first REST Web API.
Feeling accomplished as a newbie coder.

Blazorの’integrity’エラーの対処方法

Blazor webassembly self-containedをアップしても’integrity’エラーで loadingで固まる。
結構ここでつまる人が多かったみたいで、MSDNがちゃんと公式に対処方法や原因を記載。

https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0#resolve-integrity-check-failures

Long story short, just add: <BlazorCacheBootResources>false</BlazorCacheBootResources>
to the properties in your .csproj file and rebuild.

(This is purely situational, further reading recommended)