Error “This message cannot support the operation because it has been read”

前端 未结 3 1211
误落风尘
误落风尘 2020-12-30 02:29

I have the same problem that is listed in the following thread.

WSDL first WCF server where client does not send SOAPAction

I performed the steps that are li

3条回答
  •  执笔经年
    2020-12-30 03:05

    I had a very similar issue, using code from WCF Samples (RouteByBody to be precise) as well, and was able to solve it in a different way so I'll post it here in case it helps anybody.

    Situation: The client application (consumer) would work in Release, however, when the debugger was attached it would always fail with the error "This message cannot support the operation because it has been read".

    After much tracing and logging WCF messages, the only solution that worked for me turned out to be so simple:

    My Service was hosted on IIS, and with debug="true" in the section of the web.config.

    Changing it to debug="false" on the service fixed all my problems.

提交回复
热议问题