[.NET] Những lỗi gặp phải và cách fix

1. System.Net.Http.HttpContent' does not contain a definition for 'ReadAsAsync' and no extension method 
Khắc phục: Install nuget: System.Net.Http.Formattin
2. Value cannot be null. Parameter name: uriString

 Khắc phục: 

<add key="apiBaseAddress" value="https://localhost:44308/api/ControllerNameAPI" />



3. Đối với file css:
     Khi push từ local sang server, nếu trong server đã có file code css từ local push sang, nhưng chạy trên trình duyệt thì không nhận được css. Cách khắc phục: Clear cached brower trình duyệt.



4. Lỗi: fatal: Authentication failed for git extendsion
Cách khắc phục:Cách 1: git extendsion -> Tools->General or import key -> Generate -> Lưu keyClon project-> Load ssh key.Cách 2: Windows -> Control panel -> Users account  -> Manager your credentials -> Windows credentials
5. Cài đặt nuget package Visual
Install nuget:
Install-Package Microsoft.EntityFrameworkCore.Tools
Install-Package Microsoft.EntityFrameworkCore.SqlServer
PM> update-database
PM> Add-Migration StudentApplication.API.Models.ApplicationContext




Nhận xét

Bài đăng phổ biến từ blog này

[SQL Server] Toán tử LIKE và NOT LIKE trong SQL

[Javascript] Object constructor

[SQL Server] Lọc dữ liệu trùng với DISTINCT trong SQL