views:

671

answers:

3

I'm going mad trying to get an ASP.NET application running on IIS7 (Server2008).

I have one web site set up in IIS7 which works fine. I'm trying to create another one now but I only get 404s for all .aspx files. The Handling Mappers are all different from the working site's. Is there any way I can duplicate the working site's settings so I don't have to go through 50 mappings manually.

Or is there a better way to get the correct settings?

A: 

For IIS 5 (and 6?), Microsoft had a free download called MetaEdit. It was used for just this - backing up and restoring an IIS configuration from machine to machine. Check MS's web site to see if there is an updated version for IIS 7.

HardCode
+1  A: 

If you are merely trying to re-install the default ASP.NET mappings, the best way to do that is use

aspnet_regiis.exe

which is in the %windir%\Microsoft.NET\Framework\v___ folders (depends on which version you're trying to set -- looks like 3.5?)

Use the documentation at http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx to see whether you want to use the -i, -r, or -s option.

Alan McBee
This didn't seem to make any changes. Everything is already setup as per aspnet_regiis.exe.
Mr. Flibble
+1  A: 

IIS7's default configurations are held in c:\windows\system32\inetsrv\config\applicationHost.config

Any changes you make on a per site/application basis are stored in the web.config for that site/application.

You should be able to simply copy the files onto the second server.

blowdart
Copying the <location path=*****> section from a working site to the new one made it work. Cheers.
Mr. Flibble