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
447 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
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
warmach earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now