전에는 이런 것을 본 적이 없습니다. 내가 할 수있는 모든 것을 시도하고, 행운을 빌며 웹을 검색했고, 결국 나는 무엇이 계속되고 있는지 전혀 모른다. 저는 이것이 fif/gif 핵심 이슈를 얻지는 못하지만, 버그 수정이 쉽지 않을 것입니다. 너무 초현실적입니다.'System.Web.MimeMapping'의 형식 초기화 프로그램에서 예외가 발생했습니다. 항목이 이미 추가되었습니다. 사전에 키 : '.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
코드를 보여 주셨습니다. –
이제 흥미로운 부분이 있습니다. 페이지를 새로 고치는 대신 자바 스크립트 파일의 위치를 복사하고 브라우저에서로드했기 때문에 무슨 일이 일어나고 있는지 알 수있었습니다. Visual Studio에서 아무런 문제도 발생하지 않고 위에 복사 된 문제가있는 노란색 페이지 만 표시됩니다. 도움이된다면 특정 코드 조각을 공유하게되어 기쁘지만 정확히 무엇을 생각할 수는 없습니다. – Eddie