English 中文(简体)
IIS6 Running a ASP.NET Virtual Dir under a classic ASP Website
原标题:

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].

最佳回答

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.

问题回答

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.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签