วันพุธที่ 14 ธันวาคม พ.ศ. 2559

How to publish .Net Core ON IIS

Today I just try new Programming on .Net Core.
MVC Style and work fine on local Host  but when publish on IIS Server it can't run correctly.

First with 504 error then after few try error with 500 and finally I made it worked then follow below step.

This step will make you run it smoothly.

1. I use File System  to publish for manual upload by my FTP
2. In server IIS you must install .Net Core for Hosting and can download at https://aka.ms/dotnetcore_windowshosting_1_1_0
3. after install go to Command Prompt in server and type iisreset (I use GUI before but don't work)
4. Test Core by type dotnet to see if u can call dotnet service.
5. Add New Application Pool with .NET Framework version -> No Managed Code
6. Add Website by point to Your root app and application pool you create.
7. Your Website should work now.


วันอาทิตย์ที่ 31 พฤษภาคม พ.ศ. 2558

MVC Code First Command

enable-migrations

add-migration

update-database