Hey everyone, it’s been a very long time since I wrote anything at all, my apologies, it had been my exams and I have been very busy these days. But, now I’m back. This time I am writing a guide to setting up your own personal server at home. Typically, I write about stuff from the ground up, but for the sake of speed, I would like you to have a bit of background on a few of the things. I will try my best to cover them too, but excuse me if I miss a few things. This isbecause I want to cover a lot of things in this one single guide, and then I will write about other configurations and updates in a later post.
Introduction and Background
I had been working on ways to allow my family to communicate through proper use of their devices, however, every method required a third-party software to communicate. Plus, it required a working internet connection. If the requirement is just the connectivity and not the Internet-connectivity, I thought why don't I create a server for home that would let us communicate, share items without having to pass it through third-party networks; besides, who trusts them? That was not the main reason, the main reason was that I also enjoyed building a server for the family.
In this post, I will walk you guys through building your own web server, you can for sure then update the web application, configure the services as you need! In this post, I will walk you through the following:
- Setting up the server.
- I am using Windows Server 2012 for my purposes. I will walk you through installation of IIS (Microsoft’s web server) and a few other components required. You can install other components as required.
- Setting up an IP address to be used on your server.
- I am using Windows Server 2012 for my purposes. I will walk you through installation of IIS (Microsoft’s web server) and a few other components required. You can install other components as required.
- Setting up ASP.NET environment.
- You do have to install ASP.NET components before IIS can execute ASP.NET code in your web application.
- You do have to install ASP.NET components before IIS can execute ASP.NET code in your web application.
- Setting up Web Deploy.
- I don’t do web development on server (AKA hosting) environment. Instead, I will be developing the stuff on my own laptop. Then, I will require a service to deploy the stuff on the server.
- I will walk you through setting up the Web Deploy on server.
- I will walk you through setting up the publish profile file, to be used while publishing the web application to server through Visual Studio.
- I don’t do web development on server (AKA hosting) environment. Instead, I will be developing the stuff on my own laptop. Then, I will require a service to deploy the stuff on the server.
- Publishing and running the web application.
I assume you have the basic idea and understanding of how this stuff works, what a server is, how your web applications work, how IP addressing works and what a DNS is. I will try my best to explain these components to you too, but if I miss out anything, excuse me. Sometimes my posts do get hard to understand, if they do, just ping me and I will make things clear, it’s really hard to think of so many things at the same time…
Now, I will break the procedure down and will write about them in steps.
Setting up the server
First of all, let’s talk about setting up the server. Nothing special here, just installation of Windows Server. I could have used other servers, but then I would have needed to add patches to my applications and so on. So, instead of this, I would recommend that you just install Windows Server on your machine. You can get an evaluation copy from Microsoft, Try Windows Server 2012. Later, just install the Windows Server, I am sure you know how to do that. Also before you continue, please read the requirements for Windows Server.
You can find the explanation and procedures for installing Windows Server online. Learning procedures are also very much simple. Microsoft itself has invested a lot of good resources online for teaching and fine-tuning IT professionals. So you can learn using Windows Server from there too.
References:
Configuring the IP address to be used
If you have ever been in networking, then you already know that every device has an IP address that is used to communicate with it. Since, our server will be the hub for our communications. We need to ensure that the IP address doesn’t change. So, we would assign the IP address to our server which we would like to be used throughout the network.
Note: I will later talk about using hostnames and how to setup DNS servers on your servers for friendly URLs. For this post, let’s keep things simple and numeric.
To open the configuration window, follow the steps:
- Open the Network and Sharing center.
- Select “Change adapter settings”.
- Select the device that you are connecting through. There may be an Ethernet connection and a Wireless connection available. Select the one that you want to use. Right click → Open the Properties Window.
- We are going to update the IPv4 settings and we are just going to assign the IP address we want the device to use. So, in the list provided, select the option with “Internet Protocol Version 4 (TCP/IPv4)”. Double click.
By default, mostly, “Obtain an IP address automatically” is selected, we are going to override the default settings so we need to change this option to the one that we want. But remember, we don’t want to tinker with the DNS, Subnet mask and the gateway being used. First things that you need to understand are the local addresses in the IPv4 range. A private IP address belongs to the local network instead of the external networks such as Internet. The local IP address ranges are:
- 10.0.0.0 to 10.255.255.255
- 172.16.0.0 to 172.31.255.255
- 192.168.0.0 to 192.168.255.255
So, you can use any of the range from this, and assign this IP to your server. Your router will be able to detect the computer, however, the request won’t be sent to external networks because that is not where the IP address belongs to; local network’s IP address. So, according to my own address, network system and addresses. I will set things to the default ones that my ISP provides me with but will select a random IP address from the local range.

Figure 1: Configuring the IP address for the server.
Later, we will be using a DNS server to configure how we use the service on our devices and so on. Until this step, our server is set up and we can now install the web server to handle the incoming requests and to forward them to a “web application”. Head on to the next step.
Installing the components — and IIS
In Windows Server, you don’t have to get the executables for everything, instead you just enable and disable the services, much like Turning Windows feature on or off. In Windows Server, open your Server Manager.

Figure 2: Server Manager application in Windows Server.
In that,
- Select “Add roles and features”. This feature is used to add more services to the environment and to add or remove features from the server.
- Select “Role-based or feature-based installation”.
- Select the server. By default there will be just one server listed. If you have multiple, select the one that you want to use for the installation of the feature.
- Select the features and roles that you want to install on your machine.
a. For this section, I will just install IIS server. Select “Web Server (IIS)” and install. It is also recommended that you install .NET 4.5 features from the features list.
b. Add more features as per requirement of your server and the services that you are going to build for.
- Finally Install the selected components.
I typically do a machine restart after installing every component or service. This is not required all the time however, most of the times you should restart the machine to ensure that the components are installed and are running properly.
Now let’s dissect IIS sections in bits and study what we got there… To start IIS manager, open the Start menu and search for “inetmgr“, it would give you the application for IIS server.

Figure 3: IIS server main page shown.
You can see that this portal now lets you create new sites, connect to applications, configure the server properties, their IP addresses, domains. Even it allows you to get helpful material from peers such as TechNet, ASP.NET official website, IIS official website and much more. Navigate down to the server, by default IIS has a “Default Web Site” web site created in the environment, which is used to test whether the server works or not. You can here configure and update the server itself. You can modify the certificates, HTTP handlers, SMTP management and everything that is related to your server. Usually, everything will be managed automatically, you won’t need to do anything complex. However, in many cases you will personally have to change the state of the machine and the framework.

Figure 4: Default Web Site home page visible in IIS server.
I had installed other components related to ASP.NET itself, which may not be visible in your machine at the moment. If everything is similar, great, if not, continue reading as I will also teach you about configuring the ASP.NET framework on Windows Server.
Look to the right panel, it contains everything that you want to do with your application. It contains quick actions such as restarting the application, configuring the application, installing more services from built in galleries and much more.
Web Platform Installer
Another excellent feature to talk about here is the Web Platform Installer. This application allows you to install the best of the Microsoft products in no time. It scans your machine, checks it for updates, new software package releases and allows you to install them by directly downloading the packages on your machine.

Figure 5: Web Platform Installer can be used to install any software package relative to your machine architecture and operating system.
I wanted to talk about this great product by Microsoft, I have really enjoyed it since my days when I was starting learning how to program using WebMatrix. I really miss that tool too, but since Microsoft is no longer updating it, and Visual Studio is a beast, I don’t use or recommend it to anyone.
References:









Ramzanali MominPosted Nov 7, 2018, 10:53 PM
Thanks sir
Manav PandyaPosted Jan 21, 2017, 12:03 PM
I t shows error in user login
Manav PandyaPosted Jan 21, 2017, 12:03 PM
But ive been facing error with MVC hosting in IIS when application contains database
Manav PandyaPosted Jan 21, 2017, 12:02 PM
Thanks for sharing this ...
Michael GriffithsPosted May 24, 2016, 4:52 AM
Very informative and interesting, thanks
Humayun Kabir MamunPosted May 24, 2016, 1:01 AM
Helpful...
Thiruppathi RPosted May 23, 2016, 3:16 PM
Nice..
Debasis SahaPosted May 23, 2016, 1:46 PM
Good One..
Kuppurasu NagarajPosted May 23, 2016, 1:34 PM
Nice Sharing..
Akshay PhadkePosted May 23, 2016, 11:28 AM
Nice Simple and Straight ..