IIS 公布网站出现The given key was not present in the directionary

IIS 发布网站出现The given key was not present in the directionary.发布网站时直接复制替换掉一个文件

IIS 发布网站出现The given key was not present in the directionary.
发布网站时直接复制替换掉一个文件夹,就出现了这个bug.
删除替换的文件夹bug就没有了。
求解释
[解决办法]
当你试图访问字典中一个不存在的key,产生这个错误。
比如
Dictionary<string, string> dict = new Dictionary<string, string>();
string s = dict["123"]; //字典中不存在

具体在程序中造成这样的错误,一般是配置文件、访问QueryString、Form等字典变量、数据库等等出问题造成的。具体要看调试信息。