How do I set up a local ASP.NET 2.0 site in IIS7 for local testing?

4

This thing is so confusing compared to the old IIS, I haven't even found where to pick the version of .NET still. I had to comment out the and from my web.config because I kept getting:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

And after that I am now getting an HTTP Error 404.3 Not Found on Default.aspx BUT IT IS THERE (and I created a default page entry for it). It says it is possible it is missing a handler mapping, what the hell is that? Why did they make it so confusing to use the new IIS? I am losing a lot of time on this project trying to set this up. Did me commenting out the from my web.config create this new problem? Please help!

Oh wait it also says it's possible ASP.NET is not installed but I'm pretty sure it is I am running Windows 7. Is there something I need to configure in IIS to enable ASP.NET aspx/ashx handling?

UPDATE: Yeah I had to install asp.net now I am getting 500.19:

Module DefaultDocumentModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x800700b7 Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'Default.aspx' Config File \?\C:\Users\Ryan\Bancroft Archive\SANTIAGO\Santiago Code\trunk\web.config

Hmm...

UPDATE (2): Removed that line in web.config where it was adding Default.aspx as a default document because I already added it manually in ISS7 and it was a duplicate. Seems to be working now. Funny that I solved it after posting but I kept updating so hopefully it's not tottally a waste and this adds to the useful content of this site. Thanks for all the replies.

asp.net
iis
iis-7
installation
local
asked on Stack Overflow Feb 23, 2009 by CloudMeta • edited Apr 21, 2009 by hlovdal

4 Answers

1

make sure to check enable 32- bit application to true in the application pool advanced setting, specially if you are running in classic mode, i don't really know why but i had crazy headaches until i enabled it.

hope this helps

answered on Stack Overflow Apr 16, 2009 by DevMania
0

I find IIS7 a lot easier to configure than IIS6. I mean heaps easier.

In terms of adding a site it is not that different though, you just add a site in the IIS manager and configure the bindings you want to use. You don't need to do anything special to get it to work with asp.net 2.0, it should work out of the box.

I think I'm missing something from your question though.

answered on Stack Overflow Feb 23, 2009 by Andrew Barrett
0

Have you set the application pool to use Classic as its Managed Pipeline mode?

answered on Stack Overflow Feb 23, 2009 by MartinHN
0

I've found the best way to do this is to let Visual Studio do it for you. If you're using a Web Application Project, then in the project properties, on the Web tab, you'll have the option to use IIS. Within that option group, you'll have the choice to let Visual Studio create the virtual directory for you.

You mention version of .NET. There is only one .NET CLR version - 2.0. There is no .NET 3.0 or 3.5 CLR, if you were looking for one of those versions.

answered on Stack Overflow Apr 21, 2009 by John Saunders

User contributions licensed under CC BY-SA 3.0