This article explains a (fairly) simple solution on how you can grab role claims – or any other claims with some tweaking – and use them as the basis for targeting your WebSocket messages. Very nifty, if you ask me, without all the enterprisiness of SignalR. Talking about SignalR, another way to implement pretty much the same thing, but with all of the enterprisey goodness of SignalR, is described in this blog post: How to access claims of a SignalR user in ASP.NET Core? That…Continue reading Using role claims to target WebSockets
So a while back I posted about testing your “vanilla” WebSockets connection directly in the browser – and while that’s nice and easy, sometimes you need to class up a bit. In my case that meant upgrading to SignalR (for some corporate and enterprisey reasons as usual). It makes sense to leave behind the easy, simple, lightweight and somewhat transparent WebSockets to “upgrade” to the enterprise-ready (and arguably quite a lot less transparent) SignalR? Well – I went through that, and since I needed to…Continue reading How to test SignalR-connection in the browser?
I tend to post a lot of articles about different gotchas and configuration tweaks, but this one goes back to the roots a bit – just me and a couple of other devs hacking some code together and being blocked by a bit of an obstacle, that’s then fixed by – you guessed it – writing niftier code. Or actually, I suppose it was more about removing some and adding some of the right stuff… But isn’t that what most programming is about? Anyway –…Continue reading How to access claims of a SignalR user in ASP.NET Core?
This article explains another simple fix to an annoying issue. I guess that’s how I start most of my little tutorials, but hey, it’s true! I suppose I just have a knack for running into issues that come with poorly documented fixes or workarounds that are obvious but only in hindsight… Right? Anyway, this time my WebSocket requests were not being handled as such by my ASP.NET Controllers. “IsWebSocketRequest” was suggested by IntelliSense, but it would always be null in the code. What gives? Problem…Continue reading HttpContext.WebSockets.IsWebSocketRequest always null in .NET Core?