Archived articles - January 2015
Archive for January 2015 (8)
22
Jan
2015
Custom configuration section with intelisense
.NET229 titlesSetup intelisense for custom configuration sections in app.config
0
Config files are really useful and allow you to store some setting values without having to hard-code them. It provides out of the box configuration utility which is very flexible, but because of its flexibility, it has some drawbacks as well...read more
18
Jan
2015
Set entry assembly in Unit testing methods
.NET229 titlesResolving null entry assembly issue in unit tests
0
Recently I started writing unit tests for a small project I keep in my visualstudio online TFS repository. After few test done I run into an issue.
Since this project heavily relies on Reflection and dynamic assembly loading, main class constructor at one point is calling
...read more
18
Jan
2015
Avoiding high processor load in long running loops
.NET229 titlesKeep processor not overloaded with long running loops
0
When having a long running loop which you are not sure when it is going to end you will probably have to create a loop in a separate loop and on every iterration you will check whether some condition is true and exit the loop.
Let's say you want to execute some piece of code after some specific time, let's say after one minute or everyday at specific time (common scenario in windows services). You can do it really simple with Timer class and just few lines of code as the code below.
...read more
14
Jan
2015
Deserializing JSON to anonymus type in C#
.NET229 titlesBinding JSON string to anonyms type
0
JSON is really easy to use and it really boosts performances since it is a lot lighter than XML and SOAP.
Sometime it can be really annoying having to create POCO class every time you need to deserialize JSON value passed from client side in ASP.NET web applications. During extending project functionality this number of POCO classes can significantly grow to that matter that you have a bunch of classes for even the simplest task you have to do with JSON value.
...read more
05
Jan
2015
Application plugin host with assembly caching and auto reloading
.NET229 titlesCaching and loading plugins dynamically when plugin library updates
0
Few moths ago I wrote and article about simple way to implement plugin architecture in C# simple plugin host application approach. This approach is great for desktop applications because when you for example need to update (which means replace the plugin dll) you can easily close the app and start it again and it will pickup new code...read more
04
Jan
2015
JavaScript Eval function equivalent in C#
.NET229 titlesExecute C# code string on the fly
0
Probably who ever was working on some complicated dynamic client-side JavaScript used at least once eval functional in JavaScript. Basically this function executes the code which is passed to it as parameter...read more
30
Dec
2014
Facebook Album Browser JQuery Plugin
JavaScript31 titlesSimple Facebook public albums browser plugin for JQuery
0
Reponsive jQuery plugin for browsing public albums of a Facebook account. Plugin is suitable for both desktop and mobile websites....read more
21
Dec
2014
ASP.NET web application security check list
.NET229 titlesThings to do before your web application goes live
0
There are several things to be taken care of during development and before deployment to keep you online web app tip top regarding performance and security.
1. Logging informations
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action