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.
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:
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
Remember to mark as answer if this post answered or solved your problem.
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?
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
running .NET v2.0
app pool running .NET v2.0 Integrated pipeline
physical location on disk: d:\inetpub\wwwroot
d:\inetpub\wwwroot contains 3 directories and 2 files:
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...
Remember to mark as answer if this post answered or solved your problem.
Marked as answer by Dino He - MSFT on Feb 24, 2012 06:28 AM
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.
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.
Please remember to click "Mark as Answer" on the post that helps you. It can be beneficial to other community members reading the thread.
dhurwitz
Member
87 Points
161 Posts
404 Error on deploying new web site with different ASP.NET version to IIS6
Feb 17, 2012 06:58 PM|LINK
Hi,
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:
http://MyCompany.com/SiteA/HelloWorld.aspx
http://MyCompany.com/SiteB/HelloWorld.aspx
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:
http://MyCompanyName.com/SiteNew/HelloWorld.htm
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:
http://SiteNew.MyCompany.com/HellowWorld.aspx
This works fine. But I do not want to reconfigure my production server to use host headers.
Any suggestions?
Thanks.
Dan
b471code3
Star
13877 Points
2598 Posts
Re: 404 Error on deploying new web site with different ASP.NET version to IIS6
Feb 17, 2012 07:14 PM|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
dhurwitz
Member
87 Points
161 Posts
Re: 404 Error on deploying new web site with different ASP.NET version to IIS6
Feb 21, 2012 01:50 PM|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?
Thanks.
--Dan
b471code3
Star
13877 Points
2598 Posts
Re: 404 Error on deploying new web site with different ASP.NET version to IIS6
Feb 21, 2012 02:10 PM|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...
dhurwitz
Member
87 Points
161 Posts
Re: 404 Error on deploying new web site with different ASP.NET version to IIS6
Feb 21, 2012 05:43 PM|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.
ashwanisaini
Member
731 Points
164 Posts
Re: 404 Error on deploying new web site with different ASP.NET version to IIS6
Jun 05, 2012 02:14 PM|LINK
Just Check the below thread with:
http://forums.asp.net/post/3962918.aspx
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.