?
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
Medium Priority
?
463 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

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