0

I've built and compiled my WCF client to run successfully. I've found that as long as these two files are together, my client will run anywhere on my computer: Client.exe Client.exe.config

When I move these files to another computer, there's an error:

System.InvalidOperationException: Could not find default endpoint element that 
references contract 'Service.IService' in the ServiceModel client configuration 
section. This might be because no configuration file was found for your 
application, or because no endpoint element matching this contract could be 
found in the client element.

I've already made sure that the service URL is accessible from the intended host of the computer.

After looking up the issue, seems like a solution is to copy the config retrieved from executing:

svcutil http://host/Service.svc

to the application configuration file. However, the config info is already in the App.config file when I built the project.

Do I need to recompile/build on every client machine that intends to use the WCF web service?

qdev76
  • 149
  • 1
  • 9

1 Answers1

0

I seem to have resolved this by copying over the entire compiled folder:

Client.exe
Client.config.exe
Client.pdb
Client.vshost.exe
Client.vshost.exe.config

I don't have the time to go back and forth to see which subset of files are core or whether all these files are necessary, but hopefully someone can follow up with an answer to that.

qdev76
  • 149
  • 1
  • 9