
Image from Pexels
Tagged articles - Configuration
Found 25 articles tagged with Configuration
29
Apr
2020
Validate configurations with FluentValidation in ASP.NET Core
.NET229 titlesValidating IOptions models with FluentValidaton
0
Configuration is an important part of the application. In many cases it determines how the application will behave, for example when you have different configurations per environment...read more
02
Mar
2020
Overwriting configuration values with environment variable in ASP.NET Core
.NET229 titlesUsing environment specific variables to overwrite configuration values in ASP.NET Core
0
It is obvious that no matter what is the size and complexity of your application, configuration values on your local development machine and the environment where the application is going to run will be different. To avoid any hard-coding and recompilation of your code, the most common practice is to store application and environment specific values to configuration files...read more
01
Oct
2019
Strongly typed configuration sections with options pattern in ASP.NET Core
.NET229 titlesLoading configuration values directly to classes and use them in the runtime
0
Configuration is probably the most essential part of every application, yet we do not give much attention to it during application design and development. .NET Core has quite nice way to store configurations (usually JSON files) and already built-in extensions to access configuration values and directly cast them to a specific type...read more
05
Dec
2018
Setting up Kestrel port in configuration file in ASP.NET Core
.NET229 titlesReading port from configuration file in Program class Main method
0
When running ASP.NET Core application as self-hosted using Kestrel, it will by default use port 5000 for listening for requests. This should not be a big issue since you can always proxy requests to port 5000.
Problem occurs when you might want to have multiple applications on one host, or you simply cannot use port 5000 for security or any other reasons.Luckily, default port for ASP.NET Core application running on Kestrel can be easily changed, but in order to make it easily configurable there are few changes you need to make in your code in order to access IHostingEnvironment and IConfiguration implementation instances combined.
...read more
10
Oct
2018
Extending Serilog with additional values to log
.NET229 titlesAdding additional information to log in .NET Core application with Serilog
0
If you are building .NET Core application your choice for logger library is most likely Serilog. It is really powerful and easy to use library which allows you easy logging in all levels in your application.
One of the best features it has is easy extending of the data you want to have in your logs...read more
02
May
2018
Generic string to primitive type converter in C#
.NET229 titlesConverting string data to any primitive type in .NET and .NET Core
0
Often case when you need to convert String to a different type which is most of the time a primitive type in C# is when you are reading values from configuration. In both .NET and .NET Core, reading from configuration return plain String value...read more
03
Mar
2018
Switch from HTTP to HTTPS in existing ASP.NET web application
.NET229 titlesSwitch complete traffic from unsecured to secured with web.config update
0
Starting from few years ago, Google enforces secured over unsecured website traffic. However it is an ongoing process since both publishers and advertisers need to implement HTTPS in order to avoid mixed contnet exception in a browser and preventing ads to load on a website.
...read more
25
Feb
2018
Simplest way to store lists and dictionaries in config files
.NET229 titlesFast and simple way of storing and using lists and dictionaries in config files
0
Configuration files are a useful place too keep any related configuration settings. It provides easy to use configuration fetching which you can invoke from any part of the application.
However it does not support many stuff out of the box, but on the other hand it is pretty flexible and expendable. One of the things that are not there built in is support for lists.
...read more
07
Feb
2018
Reasons for ASP.NET application restarts on IIS server
.NET229 titlesCommon reasons for causing ASP.NET web applications to restart
0
If you were experiencing you ASP.NET Web Application to restart, there are few possible reasons for that, but before we jump to resons why ASP.NET web application hosted on IIS gets restarted let's first look at the relation between IIS and ASP.NET
...read more
13
Jan
2018
Separate configuration files per build config in Visual Studio IDE
.NET229 titlesGenerating different configuration files on the build time in VS IDE
0
It is an often case that application configuration is different for each environment. Most often this is the case for database connection string where developer has connection string to dev environment database or it's local database and quality assurance (qa) and production have different connection strings wile the rest of the config...read more
08
Jul
2015
Changing service reference configuration in the runtine
.NET229 titlesUpdating service reference without restarting your applcation
0
Using web services in C# and in general in .NET based applications is really easy. All you need is a service URL and Visual Studio will generate both proxy classes for service communication and configuration for web service endpoints and bindings...read more
03
Jul
2015
Hide IIS server info in a resposne
.NET229 titlesHide server info in ASP.NET with simple web.config setting
0
Last year I wrote an article about ASP.NET web application security check list. Apparently there are always more things to add to improve your web application security...read more
12
Jun
2015
Auto reload application config in .NET
.NET229 titlesReflect config file changes in application in a runtime
0
In .NET working with configuration is really easy and there are bunch of .NET classes that rely on config values so you do not have to specify values in their constructors. For me it a common practice to instantiate database connections of WCF client by only creating an instance with parameterless constructor while keeping values in config file...read more
13
May
2015
Reading config value to a proper data type
.NET229 titlesAutomatic conversion of values from app.config
0
Reading from application config is pretty easy in .NET. You literally need one line to fetch the value...read more
09
Apr
2015
Microsoft IIS and ASP.NET MVC caching techniques
.NET229 titlesWays to cache data and response to improve page performance
0
Of course, the best way to make you web application work fluent is to write the code properly and design the architecture of application to meet requirements and certain load depending of the type of application. But even though architecture is good, you can always improve performance by reducing processing in application code itself...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