2011-04-13 3 views
0

전에는 이런 것을 본 적이 없습니다. 내가 할 수있는 모든 것을 시도하고, 행운을 빌며 웹을 검색했고, 결국 나는 무엇이 계속되고 있는지 전혀 모른다. 저는 이것이 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 
+0

코드를 보여 주셨습니다. –

+0

이제 흥미로운 부분이 있습니다. 페이지를 새로 고치는 대신 자바 스크립트 파일의 위치를 ​​복사하고 브라우저에서로드했기 때문에 무슨 일이 일어나고 있는지 알 수있었습니다. Visual Studio에서 아무런 문제도 발생하지 않고 위에 복사 된 문제가있는 노란색 페이지 만 표시됩니다. 도움이된다면 특정 코드 조각을 공유하게되어 기쁘지만 정확히 무엇을 생각할 수는 없습니다. – Eddie

답변

0

그래서 여기에 거래의 :

은 분명히 차례로 홀수! 핑거/GIF 문제의 원인이 된 "CY-GB"문화 비교 자에 문제가 있습니다.

여기

더 많은 정보 : http://forums.iis.net/p/1175210/1979005.aspx 내 관심은 그 문화가 응용 프로그램에서 선택되고 있었다, 그리고 이유 때문에 FirstOrDefault() 두 글자 ISO 코드 == "GB"입니다이었다 잡은 무엇

https://connect.microsoft.com/VisualStudio/feedback/details/661862/system-web-mimemapping-static-constructor-crash-due-to-incorrect-string-comparer-use . 이제 문제가 해결되었지만 문제는 더 이상 발생하지 않지만 "cy-GB"문화 버그는 여전히 해결됩니다 (위에 제공된 MS Connect 링크).

희망이 있으면 비슷한 문제가있는 다른 사용자에게 도움이됩니다.

0

방금 ​​전에 똑같은 문제가있었습니다. 원인을 지적 해 주셔서 감사합니다, 에디 Control Panel > Regional and Language Options > Regional Options (tab) > Standards and formats

이동 : 이것은 내 Windows XP 컴퓨터에이 문제를 해결하기 위해 무슨 짓을

. Welsh 대신 드롭 다운 메뉴에서 English (United Kingdom)을 선택하십시오.

관련 문제