2

I've been trying to get ASP.NET 4.0 to work on Windows Server 2003 R2, 64-bit OS, IIS 6.0 in 32-bit mode. The latest thing I tried in the process was to run aspnet_regiis -s "W3SVC/12345/root" to try to change the version of ASP.NET being run on the site. This seems to have worked, and ASP.NET 4.0 code is now running properly.

However, this seems to have caused a new problem. IIS is no longer recognizing default documents of any type! I have Coldfusion installed on the server and it's default documents are not working either. When I visit http://www.myserver.com or http://www.myserver.com/subfolder, I get "404, file not found". But when I visit http://www.myserver.com/index.cfm or http://www.myserver.com/subfolder/Default.aspx, it works. I've looked at the "documents" tab in the site properties in IIS and both index.cfm and default.aspx are listed there. Why won't IIS recognize them? This was working before, how did I break it?

Edit 1:

I've found that if I create a new site in IIS with all the same settings but running on a different port - ie. http://www.myserver.com:8080/ - the default documents for ColdFusion work again. However ASP.NET default documents still don't work on the newly created site. I have to manually type in http://www.myserver.com:8080/subfolder/Default.aspx instead of http://www.myserver.com:8080/subfolder/.

Joshua Carmody
  • 175
  • 3
  • 9
  • I think what is happening is that your site is generating an error and the error page cannot be found now. Double check your error pages real quick. – pablo Feb 16 '11 at 15:58
  • @pablo Doesn't look like that's it. If I write code that generates an error on purpose the proper error is shown. Also, when I get a 404 error on one of the sites hosted on that box, the custom 404 page shows up. BTW, the default document problem is happening on every site hosted in IIS on that server, not just the one I specified when I ran aspnet_regiis. – Joshua Carmody Feb 16 '11 at 16:17

2 Answers2

2
  • Open IIS manager
  • Click on "Web Service Extensions" in the nav pane
  • On the right check "ASP.NET v2.0.*" status next to it
  • If it's "Prohibited" then change it to "Allowed"
Luke99
  • 694
  • 5
  • 7
  • 1
    It was set to "Allowed". I changed it to "Prohibited" and then "Allowed" again just in case that would help. It didn't. Rebooting also didn't help. – Joshua Carmody Feb 16 '11 at 16:06
1

Did you create Virtual Directory of the folder 'subolder'? If not then please create the Virtual Directory and then set the default and then try.

Gaurav Singh
  • 497
  • 2
  • 13
  • 1
    Yes. I did that. No difference. – Joshua Carmody Feb 16 '11 at 18:12
  • 1
    I'm still hoping to find a solution for the root sites too. Even though creating a new site solved the problem for ColdFusion, our network administrator won't let me delete the existing sites and re-create them until he knows more about why the problem happened. – Joshua Carmody Feb 16 '11 at 18:13
  • Ok, Please allow the .net 4 extensions from web service extensions also – Gaurav Singh Feb 16 '11 at 18:14
  • @Garauv They are allowed. Also ASP.NET 4.0 code is executing correctly. Only the default documents aren't working. – Joshua Carmody Feb 16 '11 at 18:19
  • 1. Open IIS Admin 2. Stop the site 3. Right-click then open properties 4. If there is an asp.net tab, make sure the correct version (1.1 or 2.0, etc..) is running 5. Create default.aspx on the documents tab and move it to the top of the list 6. Remove the others (default.htm, etc...) 7. Remove the default.htm, index.html, etc documents in the site 8. Close properties and start the site. – Gaurav Singh Feb 16 '11 at 18:27
  • @Gaurav - Didn't help. Also there is no ASP.NET tab. That's another issue. I was told in [link](http://serverfault.com/questions/235919/why-cant-i-get-asp-net-4-0-to-work-on-windows-server-2003-r2)another question that the ASP.NET tab doesn't work when running IIS in 32-bit mode on a 64-bit OS. – Joshua Carmody Feb 16 '11 at 19:13