Showing posts from 2021

Microsoft.IdentityModel.Tokens version 6.15.0 no user context in AuthorizationHandlerContext

A lesson learned i would like to share. I had a working JWT using RSA key pairs on a .NET 6 based API, installing Microsoft.IdentityModel.Tokens version 6.15.0 (latest) broke it, my custom policy handler were not getting the user context! I tried everything i know to fix it from my side but only restoring back to version 6.14.1 fixed it for me. I checked the package Github and it seems there are a couple issues mentioning dependencies version!

revenera InstallShield and Web.Config authentication mode="None"

 So, i came upon this uncommon scenario. I had a very working InstallShield to deploy a Web API into IIS, after updating to 2020R3 i think, all of the sudden the deployed site was not functioning in the most bizarre way. The API did have a couple of config./admin pages where it was working just fine, API connection to the database source was working fine as well, the connection test did include testing user credentials as well, but when i tried to use same credentials on an endpoint, i would a message that authentication was denied for this request! to add to the mix, i had the same exact Web API on the same exact IIS and the same exact connection running from Visual Studio just fine! so after many many hours of testing and smashing my head against the wall 😫, i found out the root cause, for some reason InstallShield on deployment was removing below line from my web.config included with the Web API app. <authentication mode="None"/> Copy to Clipboard now that was h

FINALLY remove unused reference is here

 i normally do not check release notes, but something pushed me to do it this time when i was about to upgrade to Visual Studio version 16.10.4, and I FOUND THIS ! Although the screen shot doesn't till what type of reference this would handle, is it only limited to NuGet packages? dose it extend to directly referenced DLLs (yes some folks still do that!) Framework files? Anyway i am existed to try this out and will update this with any findings i feel worth to share, so stay tuned! UPDATE: i am very disappointed, it's marking needed referenced projects and packages as not needed!, like i have it in a using for a class, and it's in bright white because it's used, and i can see it's being used, still it get in as unused reference, while other projects i get a message that there isn't any unused references! hope Microsoft fix this, it's really a neat feature specially for Blazor WASM , where every mb count

Visual Studio, Blazor WASM, and Docker

 So as usual my attempts to create something take to places where i find things do not work the way i wanted, then i find myself searching for a way to get things to work i want them, and in this case it might be the way a lot of people want to. last weekend i wanted to explore how easy or hard to containerize / Dockrize a .NET5 back-end, Blazor WASM front-end app. for the back-end things were super easy, just right click, add docker support, add containers orchestration and all was working, running, and debugging according to plan. Now when i tried to do the same for a Blazor WASM project things got a it ugly, seems like Visual Studio generate these according to project type, and i guess it saw the Blazor WASM as another .NET hosted web app, which is and is not quite! See Blazor WASM are entirely client side running, the server is there to just provide files but no process occur at the server, so technically you can host a Blazor WASM app on any web server (like Nginx) without the nee

Simple PayPal page with Vue

So, i needed to create a pay page for my company site i choose to go with PayPal buttons on an HTML page, simple and fast. but i needed more, so it thought why shouldn’t i hook PayPal buttons to a simple Vue can’t app, and do some URL parameters that can be intercepted by JS (yes you can so that!). The idea was simple, have an HTML and JS script you can host anywhere, and the page should be able to have two URL parameters for a description /name and amount to be paid, if those values did not exist an input field should be available for user input, and as I have Vue why not do some validations as well. If you want to take a look on the code and use it on your page visit this code repo.