WCF trouble-shoot

Your project looks something like this:

image

Is your server running under IIS or DevServer?

Check PersistenceServer project properties:

image

Is your Client(s) pointing to this?

Search your project for persistenceMapperClient

this.persistenceMapperClient1.Uri = "http://localhost:52150/EcoProjectWindowsPhone71PMPWCF.svc";

You may find multiple entries – check them all.

NOTE: If you are looking at a PersistenceMapperClient that runs on a PhoneEmulator you should not expect Localhost to work. After all Localhost would be the phone?! Well on the WindowsPhone emulator Localhost is NOT the phone – it is the your dev-pc so you can safely use localhost. But on the Android emulator Localhost will NOT work, instead use the ip: 10.0.2.2 (so replace localhost with 10.0.2.2 )

The other half of the URL comes from your persistenceServer projects definition of the WCF Service:
image

Test if it runs now… If not:

Do you have a ClientAccessPolicy.xml file on your webserver root ? Note, “ROOT” not “Directory” – on the devserver this is the same but in IIS I really must stress THE ROOT of the webserver and NOT your Virtual directory.

Does it run? If not:

Turn on logging in WCF to see what the holdup is – read about this here pay extra attention to what is required if you have declared your own enum types.

This entry was posted in WCF. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*