Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
667 views
in Technique[技术] by (71.8m points)

iis - Applicationhost.config not showing changes

We have a webserver hosted in Microsoft Azure. It's a Windows Server 2008 R2 Datacenter edition, 64 bit.

For a website hosted on this machine, I need to make changes to the applicationhost.config file. However, changes I made to IIS recently are not shown in the config. I've added a new application pool and added this specific website to that application pool. I restarted the website, the 'Date Modified' of the file is updated, but the application pool is not present.

Right now I'm editing the file in C:WindowsSystem32inetsrvconfig, but there's also one in C:WindowsSysWOW64inetsrvConfig, but the latter hasn't updated for months.

Am I looking at the wrong file? Are changes not saved right away? Do I need to restart IIS completely and not just the relevant website?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The real issue is that there are two inetsvr directories, one for 32 bits and another for 64 bits. The 32 bits 'version', probably dormant and not updated, is under SysWOW64 !!!

When you open a file on %SystemDrive%WindowsSystem32inetsrv using a 32bits application, Windows will redirect you, with no warning, to %SystemDrive%WindowsSysWOW64inetsrv possible a very obsolete file. Interesting no?

Using a 64bits editor like Notepad++ will open the 'right' active configuration file.

The following hack will make the (active) 64 bits location, accessible from 32 bits apps (for example, some Visual Studio versions).

cd /d "%SystemDrive%WindowsSysWOW64inetsrv"
move Config Config.OLD
mklink /d Config "%SystemDrive%WindowsSystem32inetsrvConfig"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...