에러발생: System.Runtime.InteropServices.COMException (0x80040154)
해결방법: IIS Apppool 속성에서 'Enable32bitApplications' 를 'True' 로 변경하고 다시 테스트해보니 해결됨.
원인:
I have a 32 bit third party dll which i have installed in 2008 R2 machine which is 64 bit.
I have a wcf service created in .net 4.5 framework which calls the 32 bit third party dll for process. Now i have build property set to target 'any' cpu and deployed it to the 64 bit machine.
This can be achieved by configuring the wcf service project properties to target to 'X86' machine instead of 'Any'.
After deploying the 'X86' version to the 2008 R2 server got the issue "System.BadImageFormatException: Could not load file or assembly"
Solution to this badimageformatexception is setting the 'Enable32bitApplications' to 'True' in IIS Apppool properties for the right apppool.
'C#' 카테고리의 다른 글
[C#] txt파일 일부분 내용 수정 (0) | 2016.10.04 |
---|---|
[C#] 와일드카드로 문자열 비교 (Compares wildcard to string) (0) | 2016.09.29 |
[C#] 웹에서 ASPNET 버전 노출 방지 (0) | 2016.09.14 |
[C#] C,C++ dll 로드시 지정된 모듈을 찾을 수 없습니다. (Exception from HRESULT: 0x8007007E) (0) | 2016.08.31 |
[C#] MSSQL 접속 (0) | 2016.07.14 |