简体   繁体   中英

Cannot run a SQL query through my WCF Web Service

After working with numerous stored procedures via a WCF service, I decided to take the more generic approach of passing the service a query from the web client [Note: I also have many functions being executed via the web service that call stored procedures on the backend.]

My generic query function works fine when I'm running Visual Studio locally, and works fine for the other functions when on the web server -- but I encounter the Error --

The message with Action ' http://tempuri.org/INewAgentLocate/GetAgents_Info_From_SearchOptions ' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.

when I attempt to run the same function from the Web Server.

Because I'm passing a SQL string to the WCF service, and attempting to return a datatable (and everything works well when run locally), I'm thinking that it's probably a security setting that's blocking.

How can I resolve this error?

As it turned out, the process of moving the code to the server wasn't working properly, so what I THOUGHT was being posted to the server, wasn't actually making it. This caused me to draw erroneous conclusions about what was happening elsewhere. Fixed this and now it works as it should.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM