Home > Uncategorized > Replace Machine Name with Domain name in WCF Service wsdl link.

Replace Machine Name with Domain name in WCF Service wsdl link.

If you installed your WCF service on a machine that has more than one network interfaces (internal and externals) then you probably faced to this problem: the wsdl link on your web services points to the internal domain (computer’s name) of the server hosting the services.

So, how to fix this? With the service metadata’s attribute, httpGetUrl.

End Point definition:

<service behaviorConfiguration="My.Service.Behavior" name="My.Services.API">
<endpoint address="http://my.externaldomain.com/serviceapi.svc" binding="basic" name="BasicHttpEndpoint" contract="My.Service.IServiceAPI">
</endpoint>
</service>

Behaviour definition:

<behavior name="My.Service.Behavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://my.externaldomain.com/serviceapi.svc/basic" />
</behavior>

Done, Now we have domain rather machine’s name.
If you need SSL, then go with httpsGetEnabled and httpsGetUrl.

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.