tags:

views:

1096

answers:

2

I just created a WCF service with this MSDN tutorial.

  • from within Visual studio I can CTRL-F5 the service so it is running
  • then I can start my Console Application Client and consume the service no problem

Now I want to start my service OUTSIDE visual studio and have various clients consume it.

But when I go to the command line and execute this file ../bin/Debug/testService.exe, I get an exception: "Input has the wrong format".

I get the same error when I publish the service and start the published .exe file.

What am I missing here? Do I need to send some kind of parameter that Visual Studio is sending to make it run?

How can I run my WCF service externally outside Visual Studio?

+1  A: 

Without seeing your code and config files it is difficult to work out why your getting this problem, but setting up a WCF service correctly can be a little tricky at first.

I recommend checking out the endpoint.TV screencasts on WCF and in particular the self hosting WCF services screencast.

They are easy to follow and will explain enough to get you started.

brodie
A: 

For me, the easiest way to show someone how to get a WCF app up and running so you can learn is to create it all manually, eschewing the VS2008 built in tools. Here's an excellent tutorial that shows you what to do:

WCF the Manual Way - the Right Way

I wrote an article expanding on that article a little bit over on my blog post. I included sourcefiles as well as a screencast. You can find it here:

Manual WCF - An Extension

Also, an excellent series of tutorials can be found in Michele Bustamante's Learning WCF. It's a bit dated, focusing on .NET 3.0, but most of the examples still work and she's updated her source on her blog.

Terry Donaghe