
Image from Pexels
Tagged articles - ASP.NET
Found 89 articles tagged with ASP.NET
15
Mar
2017
Clean up IIS log files from you web server
.NET229 titlesAvoid low disk space because of IIS logs
0
Microsoft IIS Server is by default logging every request that reaches it.
This can be pretty useful for tracking down the issue which my occur over time, but it is also pilling up log files on server's disk which eventually can cause low disk space. You an always clean up these files manually, but wouldn't it be nice if server does that for you?
...read more
18
Jan
2017
Why is JsonRequestBehavior needed?
.NET229 titlesUnderstanding JSON data restriction over HTTP GET requests
0
You probably run to this exception when you tried to fetch JSON data over HTTP GET request. Now, first this is easy to bypass by simply adding JsonRequestBehavior.AllowGet option to method which is retutning JSON data for GET request in a controller file.
...read more
17
Dec
2016
Simple Office365 authentication
.NET229 titlesUse Office365 account login for your application
0
With so many online and cloud based services, adding one more additional account for your application adds additional complexity level for your users since they will have to manage one more account and remember one more password.
Microsft ASP.NET comes with pretty nice built in provides for social networks, but for office usage social networks are not so convenient to be used.
...read more
30
Oct
2015
IP address filtering from C# code in ASP.NET MVC and Web Api
.NET229 titlesRestrict or allow specific IP addresses to access your WebApi or MVC
0
Last year I wrote an article about IP address filtering on MVC and WebApi Restrict Access to an MVC Action or Controller based on IP address. Over time the requirements for IP filtering in several web based application increased, so I had t work on this class to make it more extendible and reusable in different scenarios...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
17
May
2015
Working with GoogleMaps in jQuery style
JavaScript31 titlesjQuery plugin for GoogleMaps
0
I've used GoogleMaps on several web projects and it seemed to me that I'm repeating a lot of code used in the previous projects which lead me to write a common Javascript library to help me easily reuse the code by only copying the JavaScript library to a project or referencing it from CDN.
I could not think of a better way to build this library than to use jQuery and build a pligin for this.
...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
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Umbraco CMS25 titlesSimple sitemap.xml Umbraco handler
0
Sitemap.xml is important component of SEO which is responsible for indexing your website. Search engine robots are generating indexes of your website based on this file.
Since content in Umbraco website is dynamic, it makes not so much sence to have static sitemap.xml file for indexing your content...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
02
Apr
2015
Block referrer spam request on ASP.NET application
.NET229 titlesBlock unwanted spam traffic from your wesbite
0
Recently I was checking my Google Analytics for this website I spotted some referrer urls that were completely unknown to me. When I tried to visit the url of the referrers I got a lot of commercial and pop-ups after few redirects.
It looked really suspicious, so I tried to find a little bit more about these.
...read more
22
Mar
2015
Enabling CORS only for specific domains in ASP.NET
.NET229 titlesEnable cross origin resquests only for certain domains in ASP.NET
0
Cross-origin resource sharing (CORS) means that page from other domain can make request to some resource which is on other domain. For example, if you try to invoke some WEB API method which is running on different domain you will get exception in the script.
By default CORS are disabled in ASP.NET bot you can easily enable them just by modifying web.config for IIS7 and newer versions pf IIS.
...read more
19
Mar
2015
Styles and images in app_offline.htm file
.NET229 titlesDisplay elegant maintenance page while you are upgrading your website
0
From time to time we all need to do some maintenance to our websites. ASP.NET has nice integrated feature to put your website online while you are updating files and libraries...read more
17
Mar
2015
Zip whole folder on the fly in ASP.NET MVC application
.NET229 titlesGenerate folder archive and send zip file in a response in ASP.NET MVC
0
Generating Zip archives has always been a great thing if you need to generate different content for the request depending on some parameters. In case you need to return multiple files this is one approach to go with...read more
15
Mar
2015
Detect when file download request is finished with jQuery
JavaScript31 titlesFiguring out when file download request completes with jQuery
0
Recently I started a small free service app for extracting icons from application files .exe and .dll. It is called IconExtract and it is hosted at http://iconextract.dejanstojanovic.net/
It basically takes application file you submit, extracts icons and returns them zipped, so beside long running upload there is some processing on the back-end when file is uploaded as well.
...read more
12
Mar
2015
Image thumbnail Html helper with image caching for the perforance
.NET229 titlesCreating image thumbnail with caching in MVC
0
Creating image thumbnail on the fly is pretty easy in ASP.NET whether you are still using WebForms or MVC. There is even a methods introduced in .NET 4.5 framework for generating thumbnail image from a Bitmap class instance.
You can easily create and action in a controller and generate and return thumbnail image on the fly...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