Posts

Create virtual machine using PowerShell command

Just run this PowerShell script to create virtual machine, you can change setting in order to have other operating system and pricing.


Hope this helps.

Free SSL Certificate for your website - from CloudFlare

Image
In this video post you will learn about free SSL certificate and its installation. This free SSL certificate is from CloudFlare but due to lack of installation guidelines and step by step we as a developer ignores this. Using CloudFlare SSL is a great advantage because you get other service for free too. Off-course, with paid plans you will get all the gems. Remember this never affects your SEO ranks.

Now, let's begin talking about this free SSL certificate. CloudFlare SSL sits between your user and your hosting server. So any potential attack is taken care by CloudFlare before they reach your server. So your user will see SSL certificate till their request reaches CloudFlare server.

If you already have a website running without SSL and you want to get this, then i would recommend to take a screenshot of your domain NS, CNAME, A, AAAA, MX records before you try this.

If you don't want any downtime, off-course, then steps would be like: whatever settings you have on your domai…

Migrating Azure VMs on VNet from Azure Service Management (Classic or ASM) to Azure Resource Manager (Resource Manager or ARM)

In this post you will find code snippet to migrate your classic Azure VMs that is part of virtual networks. That is, you will learn Migrating Azure VMs on VNet from Azure Service Management (Classic or ASM) to Azure Resource Manager (Resource Manager or ARM). Without too much discussion, let's start step by step.

You need to have PowerShell installed. In the process of migration you first need to sign in your subscription using modern way that is ARM to prepare migration and then sign in your same subscription using classic approach that is ASM to perform migration and commit.

Step 1.
Let's login ARM

Login-AzureRmAccount

Step 2.
Store subscription id into a variable

$SubID = "1345e4-4561-1bd7-55c1-e3848012qw4r"

Step 3.
Select subscription using above variable

Select-AzureRmSubscription -SubscriptionID $SubID

Step 4.
Now, let's prepare the migration on ARM, this operation may take few minutes.

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastru…

Slug URL in MVC

Creating a human friendly URL is one of the important goal in content management system. Recently one developer asked me this question. Like he always sees 'id' in URL in MVC application which is not human friendly. He mentioned stack-overflow example when explaining issue to me, so let’s discuss about this. Open stack-overflow page https://stackoverflow.com/questions/40956081
you will be redirected to https://stackoverflow.com/questions/40956081/runtime-exception-thrown-when-stdvector-destructing
Notice the last part in the query, this is nothing but a slug that is being added in URL all the time. Technically both URL maps to same resource. And in URL number '40956081' is unique identifier.

I hope you know Stack-Overflow is also build using ASP.NET MVC. Let's build similar slug and similar behavior in your MVC application.
First you need to configure your route as give below:
public static void RegisterRoutes(RouteCollection routes) { ro…

Azure Media Service Encoding with custom presets

Image
In this post you will learn how to use custom preset for Azure Media Service Encoding. But before that let's look at a case study or issue which I faced.

When I uploaded a 55.5 MB mp4 file and encoded with "H264AdaptiveBitrateMP4Set720p" encoder preset, I received following output files:


















Look into green rectangular highlighted video files in the image, this looks good according to input file size. But if you look at red rectangular highlighted video files, these are *improved* files for adaptive streaming, which looks useless if you compare with my example "a dark line on my face in video can't be removed by system automatically...make sense". Here I'm trying to understand Azure Media Services encoding permutations but increasing file size 2-3 times larger than input file is never a acceptable deal.

Why I should pay more for bandwidth and storage on these large files, how I convince my clients?

On this issue I thought to understand this from community …

Microsoft MVP: Honored to have received the Microsoft MVP award for the 5th year

Image
MVP Again J 1st July 6:30 PM IST has a very special meaning to me, this day starts with full of expectations and fast heartbeats which lasts until the moment of receiving email from Microsoft. Earlier we had a trick to know renewal status even before official confirmation, but this is that hole is closed ;)
So, once again Microsoft awarded me with the MVP (Most Valuable Professional) award for the 5th time in a row in the Visual Studio and Development Technologies (earlier it was ASP.NET/IIS) category.

I'm honored to be the part of Microsoft MVP Program, this is one of the most prestigious award to me.
Here is the body of the mail that I received:


























I'd like to thanks to my family, all friends, Microsoft Indian MVP Group, Biplab Paul (India MVP Program Lead), Gandharv Rawat and my blog readers and followers.

A very-very special thanks to 👩 who is supporting me every day.
Thanks.

Caching in MVC with Donut Caching - excluding caching login

The main purpose of using caching is to dramatically improve the performance of your application. This is nothing but output caching that means whatever you see is cached, and exact similar things is display to everyone.
I recommend you to read Output Caching in MVC post before you read here, because you should be very careful when using any caching mechanism. Or, if you already know output caching, keep reading here only.
Biggest problem you face
If you display user login status on page which you want to cache, then you need to be careful. With output cache attribute [OutputCache(....)] caches everything on page and it will not exclude caching of some portion like login status.
In the situation, the best caching library you should use is Donut Caching (aka Donut Output Caching). Let’s understand its uses.
Using Donut Caching
The best way to add donut caching to your MVC project is to use the NuGet package. From within Visual Studio, select Tools | Library Package Manager and then choo…

Popular posts from this blog