I was under the impression Asp.Net core can have only one directory for static files. Recently I came across this article and it shows how we can configure multiple directories for Static Files in ASP.NET Core.
Cheers,
Samitha
I was under the impression Asp.Net core can have only one directory for static files. Recently I came across this article and it shows how we can configure multiple directories for Static Files in ASP.NET Core.
Cheers,
Samitha
Recently my machine gave me some trouble when trying to remove some app from it. I came across this useful post having options remove problematic apps/programs from a windows 10/11 PC.
From the given list Method V - Run the Microsoft Install/Uninstall troubleshooter was the quickest one worked for me.
Cheers,
Samitha
When designing WEB APIs we, as developers are interested in response codes returned after doing an operation.
Following are the response codes and there meanings
Regards,
Samitha
GitHub Codespaces templates provides you quick and easy development setup you need, Check this video for more information.
Regards,
Samitha
With the changes to Program.cs in .Net Core 7, we can still access confirmation options as below
appsettings.json
Program.cs{
"Settings": {
"AccessTokenKey": "abcd123",
"AccessTokenExpirySeconds": 3600,
"RefreshTokenExpiryDays": 30
}
}
var builder = WebApplication.CreateBuilder();
ConfigurationManager config= builder.Configuration; // allows access to the config
IWebHostEnvironment environment = builder.Environment;// access the environment
var key = builder .Configuration["Settings:AccessTokenKey"];
Cheers,
Samitha
When working with .Net 7 WEB API projects you might have encountered following error when connection to SQL Server.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.).
This occurs due to a breaking change in SQL driver.
This issue can be resolved by adding TrustServerCertificate=True attribute to your connection string as shown below.
"ConnectionStrings": {
"DefaultConnection": "Server=SQL_SERVER_NAME;Database=DATABASE_NAME;Integrated Security=True;TrustServerCertificate=True;",
}
Cheers,
Samithaa
As a backend developer, I found OneOf package is pretty useful in returning several types from a one method.
With OneOf you van return,
from the service.
You can download OneOf package here and read more about usage here.
Regards,
Samitha
As a backend developer, I have primarily used this package to return the objects, validation errors, and try..catch errors from the service.