IIS7.5 Not Compiling Code From App_Code folder

孤街浪徒 提交于 2019-12-08 13:52:19

问题


I just recently upgraded to IIS7.5 locally. Our Production system is IIS6.0 (Windows Server 2005). I have a folder setup with an APP_Code folder in production, linked to IIS as a virtual directory. The code compiles fine there. However, my test environment is local (Windows 7 with IIS7.5). The code here will not compile from the APP_Code folder, same folder and virtual directory construction. I do not have a web.config file (using default inheritance). I did not experience these issues until updating to IIS7.5. All files were created in a notepad-like environment (not a project through Microsoft Visual Studio). Any help is appreciated.


回答1:


My understanding is that IIS7 won't be able to compile files in a APP_CODE directory that is setup as a virtual directory in IIS. Instead, you need to reference files as a subfolder/virtualdir of the APP_CODE directory while keeping the APP_CODE folder a physical directory on the web root. Which would be a better practice anyway, since each website should have its own unique APP_CODE folder anyway. So each website should have a physical /APP_CODE/ directory and in IIS just create new virtual dir in the /APP_CODE directory referencing the folder containing the files you want to be virtual, i.e.- /APP_CODE/VIRTUALDIR/.



来源:https://stackoverflow.com/questions/16863107/iis7-5-not-compiling-code-from-app-code-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!