Image for post
Image for post
Base64 Encoding Decoding

Let us start with a simple conversion which will make it understandable what is Base64 meant by using this link to convert the encoded message below to understandable content.

Q29uZ3JhdHVsYXRpb25zISBZb3UgZmlndXJlZCBvdXQgdGhlIG1lYW5pbmcgb2YgdGhlIGVuY29kZWQgZGF0YSBpbiBCYXNlNjQu

Where to Use?

It is used to transfer content-based messages over the Internet.

Why Use it?

For example, mail systems cannot deal with binary data because they expect ASCII (textual) data. So if you want to transfer an image or another file, it will get corrupted because of the way it deals with the data.

Now let us try to do some Base64 Encoding (btoa) and some Base64 Decoding (atob) using…


Image for post
Image for post
Disclaimer: This is an illustration. Should not be compared with reality

After investing a lot of time in solving the date-time difference problem between Server and Clients due to them being at different Timezone, I understood a few things which I would share with you.

  1. You can’t control the client’s timezone.
  2. You can only control your server-side timezone.
  3. You can’t force your client to accept your specific date-time.

So there are two solutions I came up with:

Solution 1: Ask for a preferred timezone from client

In this process, you ask a preferred timezone to the client and keep it stored in your system. While fetching data back to the client we make a wrapper which accepts the stored date-time with server timezone, converts to the clients preferred timezone and then send it to the client. …


Image for post
Image for post

Let’s get the connectionStrings inside the web.config file to a separate file for better maintenance of the code.

Step 1: Open your web.config file.

Step 2: You will see your connectionStrings code in there

Image for post
Image for post
Image for post
Image for post

Step 3: Add a new config file name as ConnectionStrings.config and copy the above code into it

Image for post
Image for post
Image for post
Image for post

Step 4: In your web.config where the code was changing the path to the new ConnectionStrings.config file

Image for post
Image for post
Image for post
Image for post

Step 5: Run the application normally

Why we did this?

  • Separate code helps better maintenance of the code.
  • Easy change of the connection to the database when hosting.
  • Maintain separate files for development and deployment environment.

These are just some options you can do more.


Image for post
Image for post

Let’s get the appSettings inside the web.config file to a separate file for better maintenance of the code.

Step 1: Open your web.config file.

Step 2: You will see your appSettings code in there

Image for post
Image for post

Step 3: Create a new config file in the project name “PrivateSettings.config” and add the settings code you want to keep there.

Image for post
Image for post

Step 4: Add the path to your extra appSettings file to the web.config appSettings tag

Image for post
Image for post

Step 5: Run your application normally.

Above I mentioned “extra” because it will not neglect the settings added in the web.config but will just also consider one in the new file “PrivateSettings.config”.

Why we did this?

  • Separate code helps better maintenance of the code.
  • Easy change of the connection to the database when hosting.
  • Maintain separate files for development and deployment environment.

These are just some options you can do more.


In this post, we will talk about deploying any ASP .Net MVC Applications kept on a Source Code Management (SCM) to the local IIS server using Jenkins Pipeline.

Image for post
Image for post
Jenkins Pipeline to deploy ASP .Net MVC Applications at SCM to local IIS Server

Pre-requisite

· Jenkins

· ASP .Net Application

· Source Code Management tool (I am using GitLab for this post)

· IIS Server

PS: I will not be talking about setting up the above pre-requisite in this post so request you to google for the setup if you need any help.

Jenkins configurations for MS-Build

  1. MS-Build Plugin Installed
Image for post
Image for post
MS Build Plugin Installed in Jenkins

2. Global Configurations for MS-Build

Image for post
Image for post
The MS-Build path set in Jenkins Global Configurations

ASP .Net Application on GitLab

Image for post
Image for post
The Code in the GitLab with the Jenkinfile

Here you can see there is a file named “Jenkinsfile” which contains the script for the pipeline (will be talking about it further in this…


Well, web development is always interesting until you go live.

Now when you are getting your .Net Application ready you need to take care of many NFRs (Non-Functional Requirements). One of the NFRs is of compatibility with different browsers and versions.

Q. Why we need to do this?

A. Well an incompatible browser will always lead to broken features in your application as one or more libraries will run with errors thus the end-user will get distorted or uneven UI and you will get escalations.

As you can’t always control your end-users browser priorities and development for all types of browsers or versions is not an easy task. …


These days none of the web application can work without Javascript.

Q. Why should we check if javascript is disabled in the client browser

A. First to provide better service to the client on UI (priority) and second to protect your application from intrusion (it can be a motive)

Now it is really simple to do:

What I did is in my main Layout page say “_Layout.cshtml” with the “<head>” tag and added this code in the tag

<noscript><meta http-equiv="Refresh" content="0;URL=@Url.Content("~/Errorpage/JavaScriptDisabled")"></noscript>

Now in the above code, you can see a Url.Content which is the controller with action to be called when the javascript is disabled in the client’s browser.

The output for that is

Image for post
Image for post


The Microsoft Hololens came in 2016 and was a revolution in the field of AR (Augmented Reality). A self-powered computer which makes the augmentations so interactive that it always feels like it exists within the real world.

Being a developer of AR apps the first reaction I had after wearing Hololens was “WOOW”. But during development for the Hololens apps, I always had to compromise on many things due to the limitations of resources in the Hololens device itself and was always willing to see the change Microsoft will bring to the new edition.

After seeing the demo online of Hololens 2 which was made at MWC on 24th Feb 2019, I am unable to wait to have a hand on one of it and test it myself. It shows the effort that Microsoft team put in to get the new version done which is far more advanced than its earlier predecessor (Hololens 1). …


Previously:

Now as the setup of the Angular 7 is done in the system let us build out the first program by following these steps.

  • Create a folder for the application
  • Open the folder in the CMD (Command Prompt)
  • Now enter the command below to create program “demo-app”

ng new demo-app

  • During this process, the system will prompt to select these
  • Would you like to add Angular routing? Yes or No
  • Which stylesheet format would you like to use? CSS, SCSS, SASS or LESS etc.
  • Now do

cd demo-app

  • Now let us run the program just created using above command

ng serve -o

  • The above command will perform the build, run on the server and open your default browser with the program created at http://localhost:4200
Image for post
Image for post

Hope you got the result as I did.


(Wiki) Intro: Angular is a JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered in developing single-page applications.

Angular 7 is available for use recently just a few days back (October 2018).

So let us start with Angular 7:

Prerequisite:

  • Node.js version 8.x or 10.x (Must)
  • NPM (Node Package Manager)
  • Any IDE (I am using VS Code)

Now let us start by adding the Angular 7 CLI

  • Open command prompt
  • run the command

npm install -g @angular/cli

  • Now to check the installation version run command

ng version

  • If the installation goes as per plan you will get something similar as below:
Image for post
Image for post
  • Note: Please remember to check the NodeJS version to requested one else you might end in trouble in installation.

Hope you got the result as I did. If not please write to me.

About

Abhishek Mallick

Sr. Software Developer, Tech Lead & Researcher. I work on multiple technologies with multi-level of complexity.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store