Last post Jun 05, 2012 03:14 PM by ashwanisaini
Feb 17, 2012 07:58 PM|dhurwitz|LINK
This should be an easy problem to solve, but nothing is working. What am I missing?
I have a web server running Windows Server 2003 Enterprise sp1 with IIS 6. The Default Web Site is configured for ASP.NET 2.0 and the DefaultAppPool. It has several virtual directories as subfolders of the default web site. So for example, the following
two URL's, both using ASP.NET 2.0 are available and work fine:
Now I need to add a web site running ASP.NET 4.0. I downloaded and installed the .NET 4.0 redistributable on the server, with no problems.
Next I created a new app pool called DotNet4 to handle the new version. I then created a new virtual directory under Default Web Site called SiteNew, set the App Pool to DotNet4, and changed the ASP.NET version from 2.0 to 40 using the dropdown in the ASP.NET
tab of the virtual directory Properties in IIS Manager.
A HelloWorld htm file opens fine:
However, when I try to open HelloWorld.aspx in that virtual directory, which absolutely exists, I get an HTTP Error 404 - File or directory not found.
Of course this smells like a permissions problem of some sort, but for the life of me I cannot find it. I have examined all the relevant folders and permissions both in IIS Manager and Windows Explorer and made the permissions for SiteNew the exact same
as for SiteA and SiteB.
I have used aspnet_regiis -lk to see what virtual directories are assigned to which versions of ASP.NET. It confirms that the default web site is using version 2.0.50727.3053, while SiteNew is using 4.0.30319.0.
I should point out that the HelloWorld pages are stripped down to the bare minimum, with no style sheets or other pages playing a role.
Also, I have tried introducing intentional typos in the web.config, hoping to get a different error msg, but still get the 404. This leads me to believe that it is not even getting to the point where the web.config is getting opened.
Finally, I have a very similar setup working on a QA server, with the only difference being that I use host headers to point to the different sites on that server, as in:
This works fine. But I do not want to reconfigure my production server to use host headers.
Feb 17, 2012 08:14 PM|b471code3|LINK
I'm hoping this was a typo but if you don't have a HelloWorld.htm page in your directory, then it probably won't find it. I'm guessing it should be .aspx not .htm
Feb 21, 2012 02:50 PM|dhurwitz|LINK
Thanks for the reply. That was not a typo, but I guess I was not clear enough. I have two HelloWorld pages in the virtual directory: one is .htm and the other is .aspx. The former opens fine and tells me the virtual directory exists, but does not bring
ASP.NET into play.
The latter incorporates ASP.NET and requires a web.config, which is present. This should work if IIS and ASP.NET is properly configured and there are no errors in the web.config. However, the web.config is never even getting opened.
I fear that the problem is caused by the Default Web Site, SiteA, and SiteB all using .NET Ver. 2.0 and SiteNew configured to use Ver. 4.0. This despite the fact that I have set up two different app pools for the two versions. As mentioned previously,
I am successfully running different web sites with different .NET versions on the same server on my QA server, but that server uses host headers rather than subfolders.
Does anyone know of any problems using different .NET versions on the server, or can anyone think of where there might be a permissions problem coming into play?
Feb 21, 2012 03:10 PM|b471code3|LINK
If the Default Web Site is configured for .NET 2.0, you can have Applications under that website running in .NET 4.0 without a problem. Just make sure it has a different app pool running .NET 4.0 and make sure your Application is set to .NET 4.0. I've
got several apps running like this without an issue.
You mention using host headers vs. folders. This will cause a problem if you are just using a directory. In order for the different .NET versions to work under one website the "folders/directories" need to be converted to applications.
To try to be more clear, lets talk about a website with folders first (sorry if I'm being too basic for you but not sure of your knowledge with IIS):
Default Web Site
When you navigate to http://localhost/Admin/ you're accessing d:\inetpub\wwwroot\Admin\ on the disk
Now here is an example of an application or vitural directory within the Default Web Site:
When you navigate to http://localhost/MyApplication you're accessing d:\inetpub\wwwroot\Website\MyApp on the disk
Again sorry for the basics but I'm displaying the ability to use different .NET versions within the same website within IIS. Key is to make an application...
Feb 21, 2012 06:43 PM|dhurwitz|LINK
Thank you for this reply. This is how my web sites are set up, as applications rather than just folders. The only difference from what you wrote is that since i am using IIS6, it is using classic mode rather than integrated pipeline mode.
Jun 05, 2012 03:14 PM|ashwanisaini|LINK
Just Check the below thread with:
Go to the IIS6 console open “web service extension node” which is right below the “default website” node. You will see the entire ASP.Net framework list over there, by default these frameworks might be prohibited so please select ASP.Net Framework 4 and
click allow button.