\'System.Web.MimeMapping\'的类型初始值设定项引发了一个异常:已经添加了项字典中的键:\'.fif\'被添加的键:\'.gif\'

问题描述

|| 我以前从未见过这样的事情。尝试了所有可能的方法,没有运气地搜索了网络,最后我完全不知道发生了什么。我敢打赌,这将是那些愚蠢的易于修复的错误之一,尽管我不太了解fif / gif关键问题-对我来说太过现实了。 更多信息:当前正在运行MVC3(从1升级到2至3),问题是间歇性的(有时在站点负载上发生,有时需要几分钟或几分钟的时间),直接在Visual Studio上运行站点。 任何帮助是极大的赞赏!
Server Error in \'/\' Application.

Item has already been added. Key in dictionary: \'.fif\'  Key being added: \'.gif\'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: \'.fif\'  Key being added: \'.gif\'

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ArgumentException: Item has already been added. Key in dictionary: \'.fif\'  Key being added: \'.gif\']
   System.Collections.Hashtable.Insert(Object key,Object nvalue,Boolean add) +9360827
   System.Collections.Hashtable.Add(Object key,Object value) +11
   System.Web.MimeMapping..cctor() +2038

[TypeInitializationException: The type initializer for \'System.Web.MimeMapping\' threw an exception.]
   System.Web.MimeMapping.GetMimeMapping(String FileName) +23
   System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context,String overrideVirtualPath) +761
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context,AsyncCallback callback,Object state) +347
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862964
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.431
    

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)