This is how I solved this problem.
Go to Control Panel > Add or Remove Programs > Add or Remove Windows components.
Select Details for Application Server. Mark ASP.net and give OK to install ASP.net.
Here I am describing some technical issues which I faced and how I fixed them. I hope this will be helpful for those who may face the same.