-
Dotnet 6 API with a HttpDelete and that 405 Method not allowed error
As we can tell from the title of the Post, we are going to talk about figuring out why in a client app one gets a Http Status code of 405 (Method Not Allowed). When does this happen? Usually when a http request does a http PUT or DELETE. Yet, when one uses Swagger (openAPI) or Postman to directly call the same API Delete or Put, it works! This is starting to feel like a CORS issue, right? Read On ==> So 405! Indeed looking at the surface of what is going on, one thinks Ah! CORS is at it again! Absolutely, this is what it feels like. After all,…
-
The world of Dotnet Templates
I have long been using templates for dotnet new and of course Visual Studio. So I’ve started down the road of creating my own templates… or a least trying to understand how to create these, Now creating templates for dotnet new and especially for Visual Studio has never been a simple task. But let us try. The first matter is understanding where templates live. For the most part these are based on your user for your PC. This found by using a PS command: join-path -Path $env:USERPROFILE -ChildPath .templateengine This will return C:\Users\<your user name>\.templateengine And as you guess it, there is a .templateengine directory in your users directory. What…
-
Testing Block Editor
So here we go… how do we change the font… there does not seem to be a way to do that. 😎 #this is a example docker --version ⇒More
-
C# Full Timestamp
Because I’m always having to look this up… a full (useful) timestamp should always look like this… YYYYMMDD HH:MM:SS.fff => 20200730 14:58:00.000 string timeStamp = DateTime.Now.ToString("yyyyMMdd hh:mm:ss.fff tt"); //Example 20200730 03:02:39.591 PM string fileTimeStamp = DateTime.Now.ToString("yyyyMMdd_HHmmssfff"); //20200730_150535040 string fileTimeStamp2 = DateTime.Now.ToString("yyyyMMdd_hhmmssffftt");// 20200730_030707929PM ~SG
-
Blazor: And the Identity Scaffolding Mess
Ok, back around to the annoying bin. Let’s talk adding Identity to a Blazor Web Assembly app… Out of the box when you start with a Blazor WebAss project using Identity and of course ASP Core hosted (I’m using preview 2). You then decide that all of the hidden razor pages really need to be customized (don’t even get me started on Hidden razor pages). Well there is a way to do just that. You Add Scaffolded Item to the Server project and select Identity (nope not going to show you that- there’s plenty of how-to on the internet). I wait while you go figure out how-to do that…… Wait …
-
Play with dotnet tool and a BOT
I was poking about with cleaning up my DotNet Core sdks and in my travels a found this thing call dotnet tools… Let the experiment begin… To credit the source of an article on Microsoft go here: dotnet tool Do a console project with dotnet: dotnet new console -o botsay Then, of course, cd into the botsay directory… and edit the Program.cs (yeap you can do this in VS 2017) Here’s the main method: using System.Reflection; static void Main(string[] args) { if (args.Length == 0) { var versionString = Assembly.GetEntryAssembly() .GetCustomAttribute<AssemblyInformationalVersionAttribute>() .InformationalVersion .ToString(); Console.WriteLine($"botsay v{versionString}"); Console.WriteLine("-------------"); Console.WriteLine("\nUsage:"); Console.WriteLine(" botsay <message>"); return; } ShowBot(string.Join(' ', args)); } The ShowBot method is this:…



