2

All,

I have scoured this group, etc. to no avail. I have successfully hosted a WCF (Web) service in IIS7. The problem is that when IIS exposes the endpoint to the service, it used the server's local/DNS name, e.g., MyServer. I need to expose the service to machines outside my network, and this name (MyServer) is not exposed externally. I want to somehow force IIS to use a name I give it vs. using the local/DNS name of the machine on which the service is hosted.

I have tried configuring IIS to use host names/binding, but when I do that, all I ever get from IIS is "bad hostname" - it can't resolve the address to the service/.svc file. I have tried IP + host name, IP alone, hostname alone, various web.config file setting (some of the settings are difficult to follow, I might add)... all yield some sort of error.

This must be a pretty "bread and butter" thing to do... It there a straightforward solution?

Thanks, John

1
  • If you want to expose it outside your network, wouldn't an interstitial device outside the realm of wcf route a request for the external IP/Name to your internal server. I don't think this is in WCF's realm. External Request -> Your Company's firewall/device -> translated and routed to -> MyServer. Commented Feb 2, 2011 at 4:30

1 Answer 1

1

Use a wildcard in the BaseAddress configuration:

<host>
    <baseAddresses><add baseAddress="http://*/MyService" /></baseAddresses>
</host>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but unfortunately that doesn't solve the problem. I need to expose the service under a name that is different from the local machine name (I want to expose it under the machine's external IP). I can't believe this is so complicated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.