jeudi 28 janvier 2016

WCF Client Invoking Remote Server Affects LocalHost Mongo Database

I have created a server system that uses Mongo and exposes some services. One of the services creates records in the mongo database.

Obviously I also have the same environment set up on my local dev computer for debugging and testing.

So I used the WCF Client application that comes with Visual Studio to exercise and test the services I wrote.

I created my json packet in the WCF client after attaching to the remote server service.

I hit invoke and went to look in the mongo db on the server. The record it should have created wasn't there.

Without getting into the details of why, I looked in my local mongo database on my dev computer. To my surprise I found that the record it should have created on the server got created on my local dev computer instead.

Can anyone explain to me how invoking a web service on a totally different computer that is set up to attach to and write data to its local mongo database can instead access the local mongo database on the dev computer that is running the WCF client?

How is that even possible? Does the remote service somehow run in a local context when using WCF Client that allows the remote server to access localhost:27017 on my local dev computer?




Aucun commentaire:

Enregistrer un commentaire