web services - WCF WebService / IIS Hosting & Configuration Issue Behind a Firewall -


I have a simple WCF web service, it is hosted on IIS in our production domain. (Local Address: 10.10.20.100)

By default, this default website was created for "All Unassigned" IPs by default: However, I noticed that it provided the WCF service to local servers DNS name ie all URIs in WSDL were

  http: //myserver.subdomain.domain.com / ... / ...  

Not too good because I need to show this service on sites that have the production environment internal DNS There is no knowledge and this specific server does not have an external DNS name just an external IP address ...

I am "all unassigned" -> "10.10.20.100" Success has been

For this reason the service to generate WSDL with the URI

  http: //10.10.20.100 / ... ... ... < / Code> 

This is fine for other machines on subdomains and other subdomains, but here it is that I get trapped. Server external IP address (1.2.3.4) is mapped through some NAT / Pat translations, so this server is not clearly set up in IP settings (i.e. it does not show under IP configuration)

< P> If I changed the IP address of the IIS default website from "All Unassigned" -> "1.2.3.4", then the WCF service just returned ...

False Request (invalid hostname)

And if I call the IIS to the internal IP address If I try to use the service through an external IP address, then I

  a protocol binding matches the given address' http://1.2.3.4/ TestService / Service.svc 'IIS or WAS configuration has configured protocol binding at the site level, there is no way to generate IIS / WCF with WSDL URI with an external IP address that is not explicitly configured Server << p> 

Somebody can help me before I leave WCF services from the window.

This is because you do not have your host headers set. This is a very common problem, I run it all the time. There is no configuration for that URI, it checks out the host header of the site and looks correct. Even if it is in a virtual directory, you have to go to the default directory in your case, and add a host header.

Let me know how you do not know this


Comments