Come let us explore together…

Posts tagged ‘.NET framework’

.NET framework and IIS installation


Hi All,

[This post explains the configuration required for IIS when it is installed/reinstalled after .NET framework installation]

Recently I faced an issue with IIS (Server 2008) in a new VM which is described below with the solution.

I was given a VM and asked to setup the VM for as per my development environment. Initially the VM seems to be working fine but when I tried to access the IIS, I faced this issue.

The problem is the site deployed in IIS is not showing up when I tried to browse it. It displays the Forbidden error for directory listing. When I find help thru F1, It says that by default (or in new IIS which is not configured) Directory Browsing feature in IIS will be in disabled mode for websites.

Also it says to enable this feature to resolve the issue – Forbidden error.

I thought 🙂 this is the cause of IIS not opening my website and as mentioned I have enabled the Directory Browsing feature in IIS by selecting the option ‘Directory Browsing’ from features view of the website and clicked ‘Enable’ from the Actions panel (right most panel).

After doing an iisreset and refreshing the page, gives me the files and folders from the virtual directory and not the web page :(. Still I couldn’t figure out why I am not getting the web page from the deployed site.

Questions:

Is this an issues with IIS configuration / website deployment problem / functional issue with website?

I tired to deploy the same website in another VM which is in use for a long time. Here I am able to view the WebPages. Now I figured out that the new VM is having some issues in IIS configuration.

Yes. I missed some steps in IIS configuration and this issue is resolved for me by a thankful team mate.

He just ran — C:\windows\microsoft.net\framework64\v4.0.30319\aspnet_regiis /i

The cause:

When I initially steered to setup the VM, I directly installed .NET framework and the required software. I installed IIS at the last.

If you install IIS after .NET framework or if you removed and reinstalled IIS on a server that has .NET framework then rendering of your ASP.NET pages might not work.

This is because you are missing the IIS mappings associating the ASP.NET file extensions.

Solution:

1. Open the command prompt

2. At the command prompt, execute the following command

“%windir%\Microsoft.NET\Framework\–version–\aspnet_regiis.exe” –i

Note: –version– is a placeholder which should be replaced with your .NETVersion folder name.

3. Execute the command iisreset and refresh the webpage.

Enabling the directory browsing is not related to this issue and it is your preference to do so. I would recommend disabling it as a security measure to avoid exposing your files in IIS.

Hope there are 101 ways to automate…

Thanks & Regards,
Giri Prasad