本人找了一段清除缓存的代码:
 public  void ClearIECache()
    {
        Process process = new Process();
        process.StartInfo.FileName = "cmd.exe";
        process.StartInfo.Arguments = "/c " + "del /f /s /q \"%userprofile%\\Local Settings\\Temporary Internet Files\\*.*\"";
        process.StartInfo.UseShellExecute = false;
        process.StartInfo.RedirectStandardInput = true;
        process.StartInfo.RedirectStandardOutput = true;
        process.StartInfo.RedirectStandardError = true;
        process.StartInfo.CreateNoWindow = true;
        process.Start();
        string result = process.StandardOutput.ReadToEnd();
    }
在代码中调用了此方法,结果,在VS中浏览网页可以达到清除的效果,而用IIS建站浏览后,却达不到这样的效果,请问各位是什么原因?如何解决