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
450 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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