Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have developed a simple WCF service and an application to consume the service. Both Visual Studio and IIS are on the same (developers) machine.

-Application is compiled and works fine
-The application is then published and browser automatically displays the URL
http://MyServerName/Math/publish.htm. Application works fine

BUT

when I tried to use a remote client, the application errors with "there was no end point listening at http://localhost:49380/ServiceName.svc"

Why is it trying to use the localhost:49380 URL (default by VS)?

Visual Studio contains the app.config which is configured that specifies the endpoint like this:
endpoint address="http://localhost:49380/MathService.svc" binding="basicHttpBinding"
.....
Tried to edit the endpoint here but then not even the local browser would work.
Any ideas?

What I have tried:

I tried to modify the app.conf with the URL that works in localiy
I also try to specified the same URL with and without port

http://MyServerName:port/Math/publish.htm
Posted
Updated 18-Jun-16 20:16pm
v3

1 solution

Basically, it's because your client isn't trying to reference the actual service - it's still trying to access the local version. You need to make sure that your client is using the right remote address and that there are no "hard coded" connections there.
Have a look at this: How to get a basic WCF service working on a web hosting service[^] - it worked for me!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900