icelava.net

why be normal?
Welcome to icelava.net Sign in | Help
in Search

Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

Last post 02-17-2012, 23:01 by Anonymous. 6 replies.
Sort Posts: Previous Next
  •  02-21-2009, 2:34 5391

    Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    Every once in awhile, the very act of deviating from the norm to use a *gasp* 64-bit operating system meets with heavenly punishment. So much so that the most rudimentary tasks of opening a text file in a text editor is met with disapproval. I have already encountered this a few times ever since I installed x64 Windows Vista onto my home's main workstation; trying to work with IIS 7.0's new array of configuration files were a hassle. They are right there happily living in Windows Explorer. Opening them with Notepad is all fine and dandy. Like any normal operation should. But Visual Studio 2005 or 2008, or other Notepad replacements for the matter, fail mightily in their attempts to open those config files sitting innocently at C:\windows\system32\inetsrv\config. They consistently report being unable to find those files. They are right there, dammit! Are you blind?

    Except, they aren't as "innocent" as one may think they are.

    The problem with x64 Windows is certain paths are designated as 64-bit paths, and a 32-bit process, like Visual Studio, is being redirected by Windows to the 32-bit path at C:\windows\SysWOW64 whenever C:\windows\system32 is referenced. The 32-bit process thinks it is looking at C:\windows\system32\inetsrv\config when it has been given C:\windows\SysWOW64\inetsrv\config; which indeed contain none of those configuration files we are after.

    It sure sucked using Notepad to edit those files. I want all the sugary goodness of Visual Studio!

    Luckily, Robert McMurray came along more than a year later to explain what needs to be done in order to "double trick" 32-bit processes back into the original config directory. To summarise the steps in case the knowledge is lost on the other side, open a 64-bit command prompt and execute the following commands

    cd /d "%systemdrive%\windows\syswow64\inetsrv"

    move config configx86

    MKLINK /d Config "%systemdrive%\windows\system32\inetsrv\Config"

    It should report symbolic link created for Config <<===>> C:\windows\system32\inetsrv\Config

    This effectively renames the 32-bit config directory so a symbolic link of that name can take its place to redirect back to the 64-bit path which we are really interested in.

  •  05-11-2010, 13:37 6726 in reply to 5391

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    Great explanation helped save me some time. I'll hold of on making the link, since I rarely edit those files, not sure how windows will react.
  •  09-15-2010, 3:09 7103 in reply to 6726

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    I cannot find those files (or that folder) on my c:\windows\syswow64\inetsrv in windows 7

     

  •  01-13-2011, 17:13 7261 in reply to 5391

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    I cannot thank you enough for posting this information!!! I had never heard of "64-bit paths" and "32-bit paths" and it was driving me crazy that I could see the file in my file explorer (Directory Opus) but when I tried to edit it with EditPlus+ or VS2010 it kept saying the file didn't exist! You sure saved me a lot of aggravation!

  •  11-16-2011, 4:17 10456 in reply to 5391

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    thanks a lot, saved lot of time, thought of investigating this strange behavior and this link appeared first on google.
  •  12-31-2011, 17:34 11849 in reply to 5391

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    Thanks a bunch. I was aware of the SysWow64 redirection theoretically but only happend to experience first hand today. Thanks a bunch for the post.
  •  02-17-2012, 23:01 12344 in reply to 10456

    Re: Cannot open IIS 7 applicationHost.config in 64-bit Windows with 32-bit text editor

    I know this is an old thread, but thank you, anyway.

    At least I can open the files in Notepad++

     Now I just have to figure out how to persuade IIS Server Farms Platform Provisioning that it is there...

    Rob

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems