Windows 7 is an attempt from Microsoft to give its users the best of both worlds, the most popular ever Windows XP and the unpopular Windows Vista.
With up-gradations and other added features, with Windows Vista and Windows 7, comes IIS 7 as the choice of web server. Microsoft has done a commendable job by enabling IIS to host not only Classic ASP, ASP.Net but also PHP web sites / applications.
We assume configuring IIS 7 to be a geek’s job. Many users have had sleepless nights, configuring IIS 7 to host their .Net applications. Error 500.19 / Error 404.3 often greet us when we try to run our hosted applications.
In search for the right solution, many users get distracted by various blogs / posts, asking us to do what we should not. Before we move on to see what we should do, let’s see what we should NOT do. If you do this, you do so at your own risk.
If we don’t configure things properly, and then host our website, this is what we would be greeted with –
Then someone would tell us to run a particular command ¬
Or even better, to go to a folder and look for a file…
… and then make some weird changes to it. (Some allow and deny stuff).
This could land us in another trouble that we cannot imagine. After this step, IIS, instead of rendering the .Net page, would give the entire source file as it is, as if it was a text file. For God’s and our sake, let us please spare this file and move on.
Now we’ll go through, what we should do to make our lives easy –
Let’s explore what all options IIS gives us when we are installing it. When we dig deeper, we have these options when installing IIS for the first time –
As we can clearly see, ASP and ASP.Net options are not enabled for the first time. IIS wants us to enable the options that we think we’d use. This is what we need to do –
We’ll enable all the options that we need. CGI is left intentionally as we won’t use it. In case you have any use for it, please don’t hesitate to enable it.
After this step, we are ready to host our .Net application and spend our valuable time creating new applications and not configuring IIS.
In case IIS is still causing some mess, we need to authorize it. Check more about that in my next post.