CSharp Rest API

From bibbleWiki
Revision as of 04:53, 4 November 2024 by Iwiseman (talk | contribs) (Created page with "=Introduction= This is a quick refresher for C# Rest API =Installation= I am now on SDK 8.0 and found the following issues ==Use Apt not Snap== Using snap will mean your SDK cannot be found <syntaxhighlight lang="bash"> sudo apt-get install dotnet-sdk-8.0 </syntaxhighlight> ==Create new Project== This is painless and can be done with <syntaxhighlight lang="bash"> dotnet new webapi -n Catalog </syntaxhighlight> ==Setting up Certificates== The next thing is run the project...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

This is a quick refresher for C# Rest API

Installation

I am now on SDK 8.0 and found the following issues

Use Apt not Snap

Using snap will mean your SDK cannot be found

sudo apt-get install dotnet-sdk-8.0

Create new Project

This is painless and can be done with

dotnet new webapi -n Catalog

Setting up Certificates

The next thing is run the project with F5. This warns you that you are not https. You fix this with the commands below but make sure you restart chrome

dotnet dev-certs https --clean
dotnet dev-certs https --check --trust