Tag: ASPNET
Ah, good old ASP.NET.
Ah, good old ASP.NET.
This article explains how to fix an issue where your Azure Functions function (yes, that’s a capital F and a lowercase f to denote the difference between the product and the piece of compute) fails to fire when a POST request comes in, even though it’s configured to do so,…Continue reading How to fix “Unable to cast object of type ‘System.Net.Http.HttpRequestMessage’ to type ‘Microsoft.AspNetCore.Http.HttpRequest’.”
This article explains how to easily authenticate your WebSocket connections using .NET Core and vanilla JavaScript. The same concept probably applies to all sorts of front-end libraries, although some of them might offer some syntactic sugar on top of it. But it’s simple, and keeping your implementation simple is generally…Continue reading How to secure your WebSocket connection using .NET Core?
This post describes the easiest way to show description texts for properties in ASP.NET MVC 5. Sounds simple, right? We can use something like @Html.DescriptionFor(x => x.Property), right? Alas, it’s not that straightforward. A bit surprisingly, there’s no ready-made helper function for this. I’m saying “surprisingly”, because I feel like…Continue reading How to get the Description for a property in ASP.NET MVC 5?
Ha – another one, that ended up being a simple fix, but since nobody actually explains it well, took me an hour to figure out. This post ended up being another example of my “I’m going to document every single fix that took me more than 10 minutes to figure…Continue reading How to fix Microsoft.AspNetCore.Mvc.TagHelpers not being rendered!
Have you ever struggled to make your ASP.NET MVC views format your properties of type DateTime correctly? I have. And I’ve been shot in the leg by weird hacks made by both myself (just 6 months earlier) and someone else. .NET Date/DateTime formatting is an endless bag of funsies in…Continue reading How to format DateTimes in ASP.NET Core?
Google is shutting down their Facebook killer, Google+. While I’m sure there are at least 10 end-users that are sad to see the ill-fated not-that-social-medium go, the implications for Software Developers actually could be far more far-reaching. A lot of implementations of Google’s OAuth seem to rely on Google Plus’s…Continue reading Google Plus is shutting down – fix your .NET OAuth flow!
Is your Azure Web Application suffering from absolutely horrible load times every time someone accesses it for the first time every 15 minutes or so? Mine was. It was pitiful. I was developing a web-based service using EF6 and ASP.NET MVC 5, where all the assets were hosted in Azure.…Continue reading Solving Azure Web Application’s first load performance issues
This post describes the easiest way to debug the issues that may stop your Seed-method in Configuration.cs from going through. This problem concerns typically your ASP.NET MVC projects, either on .NET Framework or .NET Core – the same basic idea should work for both situations. The solution here shows you,…Continue reading The easiest way to debug Seed-method in Code-first migrations in Entity Framework
This post describes the fix to THE “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’” error, which Visual Studio throws at your face when you try to run an application on any Windows-based system (or which you’ve dug out of event logs). Also, your application is…Continue reading Fixing the “No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’” error
This page describes multiple ways to fix the ‘Spatial types and functions are not available for this provider because the assembly ‘Microsoft.SqlServer.Types’ version 10 or higher could not be found.‘ exception which comes up during debugging or publishing your program, app or service using DbGeography. Symptoms While running a console…Continue reading Solving the “Spatial types and functions are not available …” -problem