Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation.
To learn more about these changes please visit the announcement which can be found
Which basically says, hey any request made to a file inside "~/Services" should be handled by this virtual path provider. I then generate an SVC file and go download the service assembly (a ZIP file in BLOB storage) and load it into the app domain.
This all works brilliantly on premise AND in the development fabric but throws an error when deployed to Windows Azure. Just throwing this out there to see if I am doing anything that immediately pops out to anyone as non-Azure friendly.
I cannot think of a reason that Azure may cause this exception. It seems to be thrown by your own code that it uses
FileSystemWatcher Class to monitor a directory without checking its existence. One possible cause is that, as you are using your own virtual path to access svc files,
HttpServerUtility.MapPath Method may return an incorrect value.
For example, a svc file is in [siteroot]\myfiles\test.svc folder but it is accessed via a virtual path
http://domain/services/test.svc. If the svc file calls
HttpContext.Current.Server.MapPath("subfolder") to get the physical path of a folder, it get the value
[siteroot]\services\subfoler (which does not exist) instead of the expected one
FIX: Exception error message when you use a virtual path provider to serve a Web page that has a ScriptManager control: "Directory '<file directory>' does not exist. Failed to start monitoring file changes." http://support.microsoft.com/kb/957661
The IsPathVirtual checks if the path is one of the embedded resources. It's where you would check if virtual path points to "/Services" This way any other (physical) files are cached and directory monitored for changes.
PS: I Only found this by looking at exception stack trace and seeing it was getting a cache dependency.
I just wanted to let you know about this related issue:
I was receiving a parser error saying "Directory 'xxx' does not exist. Failed to start monitoring file changes". The parser error was pointed at a Register directive inside an .ascx file. Both the ascx file and target of the
Register directive were served via a custom VirtualPathProvider.