bitScry

  • Home
  • About
  • Blog
  • Contact

ASP.NET Core

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Serving Images from Blob Storage in an Azure Function
  • Redis Caching in .NET
  • Passing Environment Variables From Docker to .NET Web App
  • Retrieving Data from MySQL Stored Procedures in .NET
  • Excluding Child Properties from a List of Objects in Fluent Assertions
Tag Cloud

.NET .NET Core AAD API ASP.NET Core Authentication Authorization Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Cloud Storage Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google HTML Image IP Address JavaScript jQuery JSON List MVC MVC 6 Newtonsoft RestSharp Serilog SQL Stored Procedure Stream Table Table Storage Test Web App Web Application WordPress

Programming

Getting the Windows User Name in ASP .NET Core

If you want to get a users username in a site that uses authentication then you can just use the User object and that will provide all claims associated with that user. However if you want to get the username for a user where they’re not required to authenticate first Read more…

By Shinigami, 3 years5 May 2020 ago
Programming

IdentityServer4 Management Using Skoruba/IdentityServer4.Admin

IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core which acts as a middleware layer for managing authentication and authorization. Configuration data for the IdentityServer4 service can be persisted in a variety of storage mediums including Microsoft SQL Server, MySQL and PostgreSQL and if you want to Read more…

By Shinigami, 3 years7 February 2020 ago
Programming

Complex objects in Session and TempData Variables

Session and TempData variables can be used in MVC controllers to pass variables between actions or from actions to views, however if you want to pass complex objects through using these variables the base classes need to be extended to serialize/deserialize the provided objects to/from JSON. Once the above classes Read more…

By Shinigami, 4 years31 August 2018 ago
Programming

ASP.NET Core Rewrite Middleware Extensions

ASP.NET Core Rewrite Middleware Extensions I’ve recently updated my site and one of the demo projects on it uses the Bing Image Search API to fetch a list of images and display them. This worked fine when running locally but when published it appeared that a number of the linked Read more…

By Shinigami, 5 years3 July 2018 ago
Programming

ASP.NET Core API Routing

When creating a new API controller in a Web Application the template code created if you choose to include read/write actions provides a good overview of how to pass values through to the API methods and return results. The template assumes that the controller only has one action per HTTP Read more…

By Shinigami, 5 years21 June 2018 ago
Programming

User GeoLocation in ASP.NET Core

If you want to get the physical location of a user on your site there’s a couple of different methods that you can use, you can either use their IP address to get an approximate location or you can request a more accurate location from them using the HTML geolocation Read more…

By Shinigami, 5 years7 June 2018 ago
Programming

Bootstrap 4 Contact Form with Google reCaptcha

I’ve just started building a site using Bootstrap 4 which is different enough to Bootstrap 3 that I’m having to relearn a few things. One of those is form validation as previously I used bootstrap-validator though this doesn’t yet work with version 4. Version 4 does have it’s own inbuilt Read more…

By Shinigami, 5 years5 June 2018 ago
Programming

Using NPM and Gulp in Visual Studio 2017

By default new Web Applications created in Visual Studio 2017 use Bower for managing external libraries such as jQuery and Bootstrap, however Bower is no longer best practice (and seemed a bit flaky in Visual Studio anyway) and so for new projects I now use npm for managing packages. Using Read more…

By Shinigami, 5 years13 March 2018 ago
Programming

Uploading Files to Azure Blob Storage from the Browser

As part of an ongoing project I’ve been trying to upload files from from the browser to an ASP.NET Core MVC site, however there appears to be a hard limit preventing uploading files greater than ~28.6 MiB in size which I can’t manage to figure out a way around. As Read more…

By Shinigami, 5 years12 March 2018 ago
Programming

Adding Serilog to an ASP.NET Core 2+ Web Application

I use Serilog to log to a SQL database in most of my web applications and although it’s pretty well documented the details relevant to my projects are spread out over a few sites so I figured I’d gather them here together for future reference. Packages Install these packages from Read more…

By Shinigami, 5 years1 February 2018 ago

Posts navigation

1 2 3 Next
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle