Adding service reference to service in different solution fails

Which I'm unfortunatly not paid for.

Quick & simple: Have you hosted the service yet?

I have been in the situation where you’re absolutely certain the endpoint of a certain WCF service from another solution is on this specific address and everything should be fine, but the acursed servicereference just won’t add. VS complains about an actively refused connection (blabla) and you start pulling hair. Well… Wait before you’re bald.

There are a number of reasons why this error message could be popping up (and I won’t be discussing them all right now), but the trap I fell into in the beginning the most was that I failed to check if the service is hosted. And this is the situation I want to discuss in this post.

You need to either host the service on a fully qualified webserver (like IIS) or you need to run the service in the developer’s webserver from VS. You can do the latter by right clicking in the other solution on the serviceproject and choose ‘debug’ and then ‘Start new instance’.

Now watch how compliant your beauty is as you add the service reference and fire up your clientapplication. Enjoy!


About Danny

Bachelor in Commercial ICT MCTS Winforms .NET 2.0 MCTS ASP.NET 3.5 PSM I
This entry was posted in .NET programming, WCF and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s