Reputation: 393
If I have a machine running a WCF service, what would the address be for it on a different machine on network?
http://localhost:8080/api/stages = ???
Upvotes: 0
Views: 252
Reputation: 36
When you are hosting your WCF Service, you provide address through endpoint. The remote server will use the same address to access your service. For example, consider the following configuration
<system.serviceModel>
<services>
<service name="ServiceLib.Services.TaskService">
<endpoint address="TaskManager"
binding="wsHttpBinding"
contract="ServiceLib.Contracts.ITaskService" />
</service>
</services>
<serviceHostingEnvironment>
<serviceActivations>
<add service="ServiceLib.Services.TaskService"
relativeAddress="TaskService.svc"/>
</serviceActivations>
</serviceHostingEnvironment>
</system.serviceModel>
In this case, if the service is hosted on IIS with URL of http://localhost:8080/ then the url of your service would be http://localhost:8080/TaskService.svc/TaskManager
Upvotes: 1