Debug a WCF service that relies on x86 on the x64 platform

Source: Internet
Author: User

According to Microsoft's official explanation, WCF (previously known as "Indigo") is a unified framework for building and running service-oriented services (oriented) applications using managed code. It enables developers to build a secure, trustworthy, transactional solution across platforms that can be compatible with existing systems.

Cloud Platform Framework. The last time I encountered an egg-ache in my homework. As required, a WCF Service Library needs to be built, because my machine is x64, with compatibility in mind, the project compilation property is adjusted to x86.

The reason, I write a DLL file, need an EXE as a running container to invoke, this VS2010, this temporary container by the WCF Service Host to assume the Microsoft Visual Studio 10.0\common7\ide\ WcfSvcHost.exe When installing VS, the installer detects that the current system is x64, so the WcfSvcHost.exe is set to 64 bits, the program cannot call 32-bit DLL, so the error "incorrect format" is fortunately in HTTP// SOCIAL.MSDN.MICROSOFT.COM/FORUMS/EN/WCF/THREAD/2E29A4AA-E587-43EF-BF50-329B7CD3EEFB found a solution:
    1. Back up the original x64 version of WcfSvcHost.exe
    2. Open vs Command line command line (start, program, Vs2010,vs tool, vs Console)
    3. Switch to the folder where WcfSvcHost.exe is located by command
    4. Run command corflags/32bit+/force WcfSvcHost.exe
    5. Complete
It will work.

If you want to switch back to the original mode, you can restore the file or change the command parameters solution: 1, find the path of WcfSvcHost.exe: C:\Program files (x86) \microsoft Visual Studio 12.0\common7\ IDE2, C:\Program Files (x86) \microsoft Visual Studio 12.0\common7\tools\shortcuts to open VS2013 x64 native Tools command Prompt 3, Run command: corflags/32bit+/force WcfSvcHost.exe Note: If you want to switch back to the original mode, you can restore the file or change the command parameters.

Debug a WCF service that relies on x86 on the x64 platform

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.