Cheat Sheet: ASP.NET Core

Series of short snippets of FUC. This one is for Azure SDKs.
July 2, 2018
aspnet core

I often find myself searching the internet for the same four lines of C# all over again, because of my inability to remember anything and the complexity of my filesystem structure… That’s why I decided to start putting together quick snippets of Frequently Used Code (FUC).

This one is about ASP.NET Core.

It’s a living document, I keep updating it.

Enable CORS on REST API

Startup.cs -> ConfigureServices():

services.AddCors();

Startup.cs -> Configure():

app.UseCors(builder => builder.AllowAnyHeader().AllowAnyMethod().AllowCredentials().AllowAnyOrigin());

Location of NuGet packages

NuGet packages are installed to:

%UserProfile%\.nuget\packages
comments powered by Disqus