본문 바로가기

ASP.NET43

스레드가 중단되었습니다. System.Threading.ThreadAbortException Logout 시 aspx.cs 코드의 Response.Redirect 에서 문제가 발생. 일반적인 Response.Reidrect(String) 을 사용했을 때는 Response.Redirect(String, Boolean) 메소드의 두 번째 매개변수를 true 로 설정하여 호출하는것과 동일한 효과를 낸다. Response.Redirect(String) 호출 완료 시 HttpResponse.End 메소드를 호출하게되는데 이 메소드는 ThreadAbortException 에 대한 예외를 발생시킬 수 있다. HttpResponse.End 메소드는 현재 버퍼링된 모든 출력을 클라이언트로 보내고 페이지 실행을 중지하고 EndRequest 이벤트를 발생시킨다. 이 메소드는ASP.NET 1.0 에서 추가되었는데 c.. 2020. 9. 1.
Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from .. 서버 환경 windows 7 professional KIIS 7.5 ASP.NET framework 4 설치완료인 상태에서 MVC5 로 제작된 사이트를 구동하려 올렸으나 제목과 같은Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Razor version2.0.0.0 의 .. 2019. 3. 15.
MvcBuildViews. 뷰의 오류를 빌드하면서 잡아내자. MVC 에서 뷰의 오류를 찾는 것은 액션 페이지 마다 전부 다 방문해보면서 확인 하는 수밖에 없는 줄 알았다.(심히 노가다....)하지만! 방법이 있다.프로젝트의 csproj 파일에서 MvcBuildViews 옵션을 true 로 설정하면 뷰의 오류를 빌드시에 잡아낼수 있다.프로젝트의 csproj 파일은 프로젝트 폴더에 들어가면 프로젝트명.csproj 파일이 있을것이다.해당 파일을 메모장이나 편집기로 열어서 MvcBuildViews 의 옵션(기본값은 false)을 true 로 기능을 켠 후 빌드를 하면 (실제 진행중인 프로젝트여서 중요 네이밍부분을 모자이크 처리한점 양해바랍니다.) 위 사진처럼 뷰의 오류들이 나타난다. 옵션을 켜고 빌드하면 시간이 false 일 때보다 조금 더 오래 걸린다.이 오류들은 Mv.. 2017. 3. 23.