When you debug the original program these two days, the following error occurs when calling the WCF Service:
{"Remote server return error: (500) internal server error. "}
The error message is as follows:
The content type of the Response Message, text/html; charset = UTF-8, does not match the content type of the binding (text/xml; charset = UTF-8. If you use a custom encoder, make sure that the IsContentTypeSupported method is correctly implemented. The first 1024 bytes of the response are: "<! DOCTYPE html>
<Html>
<Head>
<Title> failed to Load file, assembly "Oracle. DataAccess", or one of its dependencies. Attackers try to load programs with incorrect format. </Title>
<Meta name = "viewport" content = "width = device-width"/>
<Style>
Body {font-family: "Verdana"; font-weight: normal; font-size:. 7em; color: black ;}
P {font-family: "Verdana"; font-weight: normal; color: black; margin-top:-5px}
B {font-family: "Verdana"; font-weight: bold; color: black; margin-top:-5px}
H1 {font-family: "Verdana"; font-weight: normal; font-size: 18pt; color: red}
H2 {font-family: "Verdana"; font-weight: normal; font-size: 14pt; color: maroon}
Pre {font-family: "Consolas", "Lucida Console", Monospace; font-size: 11pt; margin: 0; padding: 0.5em; line-height: 14pt}
. Marker {font-weight: bold; color: black; text-decoration: none ;}
. Version {color: gray ;}
. Error {margin-bottom: 10px ;}
. Expandable {text-decoration: underline; font-weight: bold ;".
Because the original program is acceptable, but the original environment is windows2003, the current environment is Windows2008 (64), the WCF Service is hosted by IIS, and the program problems are suspected, it is okay to directly access the WCF Service in the debugging environment. Therefore, access the WCF Service directly in IE, and the prompt is:
Failed to Load file or assembly "Oracle. DataAccess" or one of its dependencies. Trying to load a program with an incorrect format
I started to suspect that it was a version issue, but it could be done on other machines. Later, I found a solution to this type on the Internet, which is summarized as follows:
The 64-bit IIS application pool does not load 32-bit application sets by default. My Oracle. DataAccesss. dll is 32-bit and needs to be modified as follows:
Solve the problem after making the above adjustments.
PS: In 64-Bit mode, there are still many differences in IIS settings. You can write down all the problems you have solved and accumulate experience.
From hawksoft