Archived articles - January 2018

Archive for January 2018 (11)

Complex parameters in Windows PowerShell scripting
Passing and handling parameter in Windows PowerShell script
0
Like in any other language, in PowerShell we also want to reuse our code and execute same set of operations with different parameters. PowerShell has great support for parameters which can be used in PowerShell script invocation.If you want your script to accept parameters you need to declare them in the script file...read more
Setting ASP.NET application on IIS always running with PowerShell
Switch off AppPool timeout with PowerShell script
0
When creating new website with new application pool, bu default IIS sets your application pool in a way to save resources when inactive. This is because it does not want to run your website all the time if is there is no activity on it and keep using resources on the host for idle worker processes (w3wp.exe). This is the reason you might experience slow response when opening your website URL from time to time especially if your website has low traffic. ...read more
Concatenate list of strings in C# using LINQ
Concatenate list of string into single string using LINQ in c#
0
More often you will need a list of strings from a single string with a Split method, not so often you need to get a single string from an IEnumerable of strings, but still those requirements exist form time to time. This does not look like a complex tasks, but still there are several ways to achieve this. ...read more
Get number of messages in MSMQ with C#
MSMQ message count in .NET
0
MSMQ (Microsoft Message Queuing) is a built in Windows component. It is not so popular now days as there are more efficient and robust solutions available. However, it still has it's place in application architecture as a simple queueing system, plus as I mentioned, it comes out of the box with Windows operating system as a Windows component.This means it is still widely used Windows based applications mostly for internal notifications and services between components of the solution...read more
Automated clean up and archive of log files with PowerShell 5
Archiving old log files with PowerShell 5 and Windows Scheduled Tasks
0
Depending on the application architecture, your Windows virtual machine might have one or more applications or components of a single solution. Those might be WebApi services, Web Applications or Windows applications. Any of these components may generate logs which are important for diagnostics and tracking down events...read more
Clean up IIS log files from web server using PowerShell
Avoid low disk space because of IIS logs with PowerShell Scheduled Task
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
Setting up IIS ASP.NET WebApplication using PowerShell
Setup ASP.NET web application hosted on IIS using PowerShell
0
PowerShell is the best option for automation on Windows platform. Regardless of which platform and how you organize Continous Deployment, you will always need to introduce certain level of customization during the deployment process. Scripting with PowerShell can play main role with these kind of customizations...read more
Setting permissions for ASP.NET application on IIS with PowerShell
Setting the write permission for IIS AppPool using PowerShell
0
Very often you need to setup ASP.NET Web application on IIS server, you need to setup file and folder permission for your application on order to access content of specific folder. This can be easily done through Windows Explorer Properties window in the Security tab. ...read more
JavaScript base64 image to Bitmap in C#
Converting base64 image string to Bitmap in C#
0
Base64 serialized images are useful in many cases for serving images on page. It is also a format of image that JavaScript can generate on the fly. HTML canvas object has native support for base64 and it can be easily serialized to base64 string from JavaScript code by invoking toDataURL method of the canvas element. ...read more
Separate configuration files per build config in Visual Studio IDE
Generating 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
Manage IIS website from ASP.NET code
Controlling the current ASP.NET application running on IIS from the code
0
Microsoft made IIS management from the ASP.NET code itself much easer and accessible right out of the box by introducing Microsoft.Web.Administration library. Simply by adding the reference in your project to Microsoft.Web.Administration library you are getting options to manage websites hosted on the IIS where application is running. One of the requirements beside referencing Microsoft.Web.Administration library is setting your Application Pool to run under LocalSystem account. ...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more