tags:

views:

363

answers:

2

I want to create an ASP.NET virtual dir below a classic ASP WebSite.

The structure looks like the following.

IIS

Web Sites

Classic ASP Website

ASP.NET 2.0 Website (Virtual Dir) // This site sits under the classic ASP Website as a VD

For some reason when I try to access the Virtual Dir it looks for the Web Config in the Classic ASP Website. The two sites sit in seperate folders. We are attempting to strangle the Classic ASP website. There is one way into the website and therefore we want to use default port 80.

The following error is generated.

Parser Error Message: An error occured loading a configuration file: Failed to start monitoring changes to "This is the Classic ASP Website, when it should be the Virutal Dir" because access is denied.

Source Error [No relevant source line].

+1  A: 

Make sure that the ASP.NET worker process account (ASPNET on IIS5, IIS_WPG local group on IIS6 and higher) also has read access to the parent classic ASP site. The ASP.NET runtime looks in parent sites for web.config's.

Equally of course, ensure it has read access to your virtual directory, though it looks like it is a permissions issue on the parent folder.

It does not seem anything to do with your virtual directory not being an application as you would get a different error: "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

For more details see this MS KB article.

Wim Hollebrandse
@Wim Hollebrandse I tried your suggestion however it doesnt resolve my issue. Thanks for the link and the information is still useful.
Jonathan
+2  A: 

Make sure that the virtual directory is configured as an application. In IIS Manager, right click on the virtual directory, view Properties and choose the "Virtual Directory" tab. At the bottom under "Application Settings" you may see "Application name" grayed out. If so, click "Create" next to the name. This will create a new application space within the directory. You'll notice the icon changes from a folder with a globe to, umm, a little box with a globe in it? I have no clue what it is. But it means you're on the right track.

If you already had an application name specified then this will not help.

roufamatic
Clearly isn't that, as a different error message would be displayed. I've never seen an access denied error, when a virtual dir is not configured as an application in IIS.
Wim Hollebrandse
Might be a combination, else why is it trying to access web.config in the parent folder?
roufamatic