0

I have a web site being hosted on a Windows Server 2012 using IIS8. I had modified some code and uploaded it to the server and then restarted the website. The problem is, the old code is executing!

I have:

  • Restarted the IIS Server
  • Rebooting Windows Server 2012
  • Disabled Output Caching for the site.
  • Disabled Output Caching for the entire server
  • Removed and readded the website.

I even opened the code file in notepad on the server and confirmed that it IS the new code. The old code, to my knowledge, doesn't exist on the server! What am I missing?

4

1 回答 1

0

您可能想尝试将 Visual Studio 调试器附加到 IIS 实例,看看是否可以在旧/新代码中遇到一些断点。

在视觉工作室中执行此操作。

  1. 单击菜单栏中的“调试”
  2. 点击“附加到进程”
  3. 选中左下角的“显示所有用户的进程”复选框
  4. 从进程列表中选择 aspnet_wp.exe
  5. 点击“附加”

如果 Visual Studio 中的代码与代码不匹配,您将无法设置断点。但是,如果代码相同,您将能够附加和断点并遵循执行流程。

另外,您是否检查过 DLL 是否已部署到 GAC(全局程序集缓存)?如果 .dll 在 windows 框的两个位置都存在,则应用程序将始终提取 GAC 中的版本。

于 2013-07-25T02:23:30.140 回答