The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘.NET Core’ Category

Online .NET source code browsers for both .NET Framework and .NET Core

Posted by jpluimers on 2025/05/22

I used these .NET Source Browsers quite few times over the last decade, first for the .NET Framework and later for .NET Core (now called .NET, sometimes .NET Runtime) as well, but forgot to blog about them, so now that I discovered there is one for the Roslyn Compiler Platform as well, let’s list them all:

It was introduced as [Wayback/Archive] referencesource-beta.microsoft.com by [Wayback/Archive] A new look for .NET Reference Source – .NET Blog which explains how to use it for browsing (on-line and off-line), Visual Studio integration, debugging, and more. In about a month however it got out of beta and became the primary as it functioned so well (you can verify this while browsing through the 2014 Wayback links).

All are powered by [Wayback/Archive] KirillOsenkov/SourceBrowser:

Read the rest of this entry »

Posted in .NET, .NET 4.8, .NET Core, .NET Framework, C#, Development, Software Development | Leave a Comment »

If I ever need to do OAuth: aspnet-contrib/AspNet.Security.OAuth.Providers: OAuth 2.0 social authentication providers for ASP.NET Core

Posted by jpluimers on 2024/08/21

This is cool: [Wayback/Archive] aspnet-contrib/AspNet.Security.OAuth.Providers: OAuth 2.0 social authentication providers for ASP.NET Core.

Based on ideas at [Wayback/Archive] TerribleDev/OwinOAuthProviders: OAuth providers for Owin.

Via [Wayback/Archive] David Fowler 🇧🇧🇺🇸 on Twitter: “Since we’re on the auth topic, there’s a repository maintained by @martin_costello and @kevin_chalet for interacting with pretty much every oauth provider on the planet github.com/aspnet-contrib/AspNet.Security.OAuth.Providers… #dotnet #aspnetcore”.

OAuth 2.0 providers covered at the time of writing are in the [Wayback/Archive] AspNet.Security.OAuth.Providers/README.md: Providers at dev · aspnet-contrib/AspNet.Security.OAuth.Providers.

–jeroen

Posted in .NET, .NET Core, Authentication, C#, Development, OAuth, Power User, Security, Software Development | Leave a Comment »

David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet”

Posted by jpluimers on 2024/07/25

Reminder to check out this [Wayback/Archive] David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet” (and OCR the images):

Read the rest of this entry »

Posted in .NET, .NET Core, C#, C# 11, Development, Software Development | Leave a Comment »

How to prepare your IdentityServer for Chrome’s SameSite cookie changes – and how to deal with Safari, nevertheless – Thinktecture

Posted by jpluimers on 2021/09/15

For my link archive:

Via:

–jeroen

Posted in .NET, .NET Core, ASP.NET, C#, Chrome, Chrome, Development, Firefox, Google, Power User, Safari, Software Development, Web Browsers | Leave a Comment »

Notes a on a step by step .NET standard based stack of applications with a central core

Posted by jpluimers on 2020/10/14

The idea is to have a stack of things that can be later put into multiple micro-service pillars.

Helpful: enable “Track Active Item in Solution Explorer”:

  1. Start with an empty repository; add an origin
  2. Add .gitignore / .gitattributes appropriate for C#, for instance from github.com/Microsoft/vswhere, git commit it, and push it withgit push -u origin master.
  3. Add a blank solution using Creating a blank Visual Studio solution without a directory, and sln Format Version numbers and EmptyVisualStudioSolution
  4. Open the solution
  5. Add an “ASP.NET Core Web Application”
  6. Choose “API” in the list of ASP.NET templates, without Authentication or Docker support (let’s keep the balance bit simple enough for now)
  7. Run with Ctrl-F5, then confirm the SSL development certificate, and install it:

    ---------------------------
    Security Warning
    ---------------------------
    You are about to install a certificate from a certification authority (CA) claiming to represent:
    
    localhost
    
    Windows cannot validate that the certificate is actually from "localhost". You should confirm its origin by contacting "localhost". The following number will assist you in this process:
    
    Thumbprint (sha1): 09EA054F 14D5D4CE 6B22C5F1 3E7EBDB5 F7583116
    
    Warning:
    
    If you install this root certificate, Windows will automatically trust any certificate issued by this CA. Installing a certificate with an unconfirmed thumbprint is a security risk. If you click "Yes" you acknowledge this risk.
    
    Do you want to install this certificate?
    
    
    ---------------------------
    Yes   No   
    ---------------------------
  8. Your browser now opens at a port for debugging: https://localhost:<port>/api/values, then tries to download the result as values.json.

    This is configured in Properties\launchSettings.json under "launchUrl": "api/values" (for the browser URL) and Controllers\ValuesController.cs under // GET api/values for the actual implementation.

  9. a

 

 

 

a

a

 

IHostedService

Have any service related stuff implement IHostedService, so it is easy to deploy it in all kinds of processes:

  • console to test
  • windows service
  • ASP.NET Core service
  • Linux host application

Background information at .NET: IHostedService « The Wiert Corner – irregular stream of stuff.

–jeroen

Related:

 

Posted in .NET, .NET Core, Development, Software Development | Leave a Comment »

Side by Side user scoped .NET Core installations on Linux with dotnet-install.sh – Scott Hanselman

Posted by jpluimers on 2020/04/28

For my link archive: [WayBack] Side by Side user scoped .NET Core installations on Linux with dotnet-install.sh – Scott Hanselman

Via [WayBack] DotNetKicks on Twitteru: „Side by Side user scoped .NET Core installations on Linux with  by @shanselman  #aspnet via @DotNetKicks“

–jeroen

Posted in .NET, .NET Core, .NET Core, .NET Standard, Development, Linux, Power User, Software Development | Leave a Comment »

Debugging a stackexchange memory leak while transitioning to .NET Core: by @Nick_Craver

Posted by jpluimers on 2020/01/14

Cool thread with steps (windbg) tooling and graphs: this is how you approach problem solving.

Easiest to read: [WayBack] Thread by @Nick_Craver: “Well hello there memory leak…let’s see what you are. It’s times when I type !dumpheap without an argument that cals. Alrighty, let’s see what these little guys are: Quite a bit of repetition in here – let’s root some of the […]”

Twitter thread below the fold.

[WayBackNick Craver on Twitter: “So let’s form our dictionary in batches EF Core will load, like this. We can lower our SQL roundtrips to n / 1000 + relevant changes. It’s more SQL trips than our original 1, but we aren’t needlessly loading a million users into memory. We load about 0.3% of that instead.… https://t.co/wgHpWgCoJH”

Tooling:

Related: Some notes/links on Windows Debugging CLR applications

A good WinDbg introduction is [WayBack] Getting Started with WinDbg (User-Mode) | Microsoft Docs.

Note that temp tables in SQL Server might look nice, but actually do not scale well: [WayBack] Lucas Trzesniewski on Twitter: “I’ve found out the following massively improves performance over queries with an IN clause with lots of parameters: – Open a transaction – Create a temp table – Bulk insert your IDs into the temp table – Inner join your query on the temp table And you only make a single query.… https://t.co/anwGSrxRqh”

–jeroen

Read the rest of this entry »

Posted in .NET, .NET Core, .NET Core, .NET Standard, Development, Software Development | Leave a Comment »

.NET Core 2.0 reaches end of life, no longer supported by Microsoft | Packt Hub

Posted by jpluimers on 2019/10/11

Just in case you were using .NET Core 2.0: it is EOL now, so you should have switched to the .NET Core 2.1 which is LTS (Long Time Stable).

[WayBack] .NET Core 2.0 reaches end of life, no longer supported by Microsoft | Packt Hub

.NET Core 2.1 was released towards the end of May 2018 and .NET Core 2.1 reached EOL on October 1. This was supposed to happen on September 1 but was pushed by a month since users experienced issues in upgrading to the newer version.

.NET Core 2.1 is a long-term support (LTS) release and should be supported till at least August 2021. It is recommended to upgrade to and use .NET Core 2.1 for your projects. There are no major changes in the newer version.

.NET Core 2.0 is no longer supported and updates won’t be provided. The installers, zips and Docker images of .NET Core 2.0 will still remain available, but they won’t be unsupported. Downloads for 2.0 will still be accessible via the Download Archives. However, .NET Core 2.0 is removed from the microsoft/dotnet repository README file. All the existing images will still be available in that repository.

via [WayBack] https://hub.packtpub.com/net-core-2-0-reaches-end-of-life-no-longer-supported-by-microsoft/ – Lars Fosdal – Google+

–jeroen

Posted in .NET, .NET Core, Development, Software Development | Leave a Comment »

A command-line REPL for RESTful HTTP Services – Scott Hanselman

Posted by jpluimers on 2018/10/31

Somewhere in Q4 2018 (actual year, not fiscal year) when .NET Core 2.2 gets released, but you can tinker with it right now: [WayBack] A command-line REPL for RESTful HTTP Services – Scott Hanselman.

Release estimates at [WayBack] core/roadmap.md at master · dotnet/core · GitHub.

–jeroen

Posted in .NET, .NET Core, Development, Software Development | Leave a Comment »

Nick Craver on Twitter: “This is worth repeating: We’re migrating Stack Overflow to .NET Core. **It’s not because of performance**. There are enough major wins without even factoring performance for us to move. Any performance gains are 100% in the bonus category. We’d migrate with a 0% perf improvement.…”

Posted by jpluimers on 2018/08/21

If you are on .NET, migrate to .NET Core. If you start with .NET, start with .NET Core.

Based on:

–jeroen

Edit: nice comment on [WayBack] If you are on .NET, migrate to .NET Core. If you start with .NET, start with .NET Core. Based on: [WayBack] Nick Craver on Twitter: “This is worth repea… – Jeroen Wiert Pluimers – Google+:

Vincent Parrett's profile photo

We are porting Continua CI to .net core 2.1, I’ve been working on it for a few months now (along with other things of course), I had to contribute to a few open source projects to help get all our dependencies onto .net core, and for the most part it’s been pretty easy. I did have to change the windows service stuff, and since there is no WCF server stuff in .net core we have to find a replacement for that for server to agent communications (still exploring options, but probably going with halibut).

What hasn’t (and still isn’t) easy is porting MVC4/5 stuff to asp.net core. So many little changes that drive me absolutely potty. I was getting so frustrated that I had to put it aside for a while and work on other things, just to get my sanity back!

Posted in .NET, .NET Core, Development, Software Development | Leave a Comment »