Solved

Issue with running ASP.NET app in a virtual directory - and not in the domain's parent folder

Posted on 2004-04-23
4
455 Views
Last Modified: 2006-11-17
Hello,

I've got a calendar application that we've written that we're trying to get going in a virtual directory. If we set the "Home Directory" (in IIS) set to the calendar folder, this app runs great. But if we add the calendar folder to the parent domain as a virtual directory/application, the calendar app breaks with the error below. There is a GLOBAL.ASAX and a WEB.CONFIG in the calendar folder. There are no files at all in the parent folder (d:\inetpub\wwwroot\domainname) - just the "calendar" folder.

It's interesting that the error it sends back "Access denied to 'D:\Inetpub\wwwroot\domain\web.config'. Failed to start monitoring file changes. " That path does not reflect the calendar folder - which it is running from. It seems like it should return "Access denied to 'D:\Inetpub\wwwroot\domain\calendar\web.config'. Failed to start monitoring file changes. "

I have tried adding the web.config to the parent folder, but it didn't make any difference. Do I need to customize the web config somehow? This thing has all the correct ACLs - like I said, it runs fine when we don't run it as a virtual (but we need to).


Server Error in '/calendar' Application.
--------------------------------------------------------------------------------

Access denied to 'D:\Inetpub\wwwroot\domain\web.config'. Failed to start monitoring file changes.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Access denied to 'D:\Inetpub\wwwroot\domain\web.config'. Failed to start monitoring file changes.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[HttpException (0x80070005): Access denied to 'D:\Inetpub\wwwroot\domain\web.config'. Failed to start monitoring file changes.]
   System.Web.DirectoryMonitor.AddFileMonitor(String file) +381
   System.Web.DirectoryMonitor.StartMonitoringFile(String file, FileChangeEventHandler callback, String alias) +76
   System.Web.FileChangesMonitor.StartMonitoringFile(String alias, FileChangeEventHandler callback) +322
   System.Web.Configuration.HttpConfigurationSystem.AddFileDependency(String file) +139
   System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +503
   System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434
   System.Web.HttpContext.GetCompleteConfig() +49
   System.Web.HttpContext.GetConfig(String name) +195
   System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20
   System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +40
   System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +486

 Thanks in advance!
0
Comment
Question by:xybx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
warmach earned 250 total points
ID: 10902002
Make sure you have the virtual directory as an "application"  You can view this from IIS manager.  Then put the global.asax and web.config in the virtual directory.  If you have a compiled dll, you must put the dll file inside /virtualdirectory/bin

Best of Luck
0
 
LVL 2

Author Comment

by:xybx
ID: 10902950
I dunno what I was thinking - or why this worked all of the sudden. All I had to do to get this fixed was to set the perms for the IIS_WPG user on the parent domain folder. That fixed it immediately.

I'll give you the points since you're the fellow that tried to help.

Take care,
0
 
LVL 1

Expert Comment

by:warmach
ID: 10903087
Thanks for the points....I am a new member (joined today) so I don't have a lot of points to start...
0
 
LVL 4

Expert Comment

by:bhermer
ID: 11099026
just for interest for anyone reading this : http://support.microsoft.com/default.aspx?scid=kb;en-us;Q316721 

an article I found outlining this problem
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question