4

the issue is that my source is hosted on the host machine (in this case a mac book pro) and visual studio wants to be able to monitor the web.config for changes so it is throwing the error:

An error occurred loading a configuration file: Failed to start monitoring changes to: \path\to\web.config

I have tried to add the HKLM\Software\Asp.Net\FCNMode=1 but it doesn't seem to work. Also, I don't see moving the source to the VHD as a viable option due to version control issues.

Windows 7 64-bit Visual Studio 2008 VMWare Fusion 3.01

Thanks.

Gabe Anzelini
  • 231
  • 1
  • 3
  • 10
  • I'm assuming this is a debugging issue, and you are trying to use the dev server built in to vs2008 to debug...can you confirm? – Simon Fox Feb 08 '10 at 08:51

4 Answers4

9

You have the right idea, but need to edit the correct key for Windows 7.

  • Open up RegEdit
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET
  • Add a REG_DWORD registry entry called FCNMode and set its value to 1

Re-boot and you should be good to go. The "Wow6432Node" allows you to set this for Windows 7 64-bit Visual Studio.

befletcher
  • 93
  • 1
  • 4
  • I did this for 32-bit windows 7 guest on virtualbox and I get "Server Error in '/' Application. Required permissions cannot be acquired. " Any ideas? – webXL Sep 29 '11 at 17:54
  • Okay, that error was for a memcache dll. The solution was to follow these instructions: https://julianscorner.com/wiki/programming/caspol_network_share +1 though for your answer – webXL Sep 29 '11 at 20:12
  • +1. Worked for me on parallels, Win 7/64, Visual Studio 2010. BTW, an REG_QWORD (64 bit value) did not work - it just seemed *logical* that that would work, but we're talking Windoze here. – radarbob Apr 15 '12 at 01:02
  • Thank you! Struggled with it for a long time then saw your answer! – Sean Jun 25 '12 at 01:53
  • Just wanted to mention this worked for me as well, thanks! I'm running Virtualbox with windows7 as guest (and host). aspnet_compiler.exe reported an error "Failed to start monitoring changes to" when trying to compile sources on a vboxsvr network share. – Paul Bormans May 24 '13 at 13:00
1

It looks like you can now change FCNMode in your web.config. They probably added it in .NET 4.5, could not find any of documentation but this, but it seems to work.

<system.web>        
    <httpRuntime fcnMode="Disabled"/>
Dmitry
  • 17,078
  • 2
  • 44
  • 70
0

I'm no filesystem/virtualization expert but I'm guessing that the account that the dev server process is running under does not have permissions to access the configuration file (web.config). The accounts within your VM won't recognized by OS X either so you won't be able to change the permissions to get it to work in this way.

What I would suggest would be to add the IIS component (via Control Panel->Programs->Turn Windows Components on or off) if you haven't already. Then add an application to IIS with the virtual directory within the VHD of your VM. Now to debug, first publish your application to the newly created IIS application (something like http://localhost/MyNewIISApplication) and attach the VS debugger to the IIS worker process w3wp.exe (i.e. Debug->Attach to Process...).

Simon Fox
  • 10,409
  • 7
  • 60
  • 81
-2

I don't see a problem having the working copy of your code on a VM if the code repository is somewhere else.

ukdavo
  • 177
  • 1
  • 8
  • well for one, it's git and the git implementation is incredible slow on windows in comparison to the mac. i also enjoy using some of the tools on the files in the project when need be. ie textmate for quick edits – Gabe Anzelini Feb 08 '10 at 16:52