views:

632

answers:

2

Duplicate: This is the exact same question, from the exact same person, as Issue with Incorrect URLs in the WSDL of a .NET Web Service, and has the exact same answer. Let's please close this and merge it with the other.


We have installed an ASP.NET web site on a client's server. This site has a web service with a couple of web methods that are called by a Flash object in order to display a news feed. If you browse to their site (ex: www.domain.com), everything's working fine except the flash.

The issue is that when we browse to the .asmx, the header shows that the Host is a subdomain internal to their network (internal.domain.com). Obviously this doesn't resolve to any public IP when browsing from outside of their network. This causes the Flash to fail since the flash object is embedded on a page and is therefore running client side.

I checked the computer name on the server in question, and it doesn't even match "internal.domain.com" - it is something completely different. Where is it getting this information from. It is not coming from IIS, since we have no host headers set up, and the IP for the site is set to (all unassigned).

We either need to force the web service to run against a specific host, or we need to change something on the server so that it resolves to a valid public-facing host name. Any and all help is greatly appreciated!!!!

A: 

Web service host names are usually configured in the web.config when being consumed by .NET. When they are being consumed by flash you might need to go looking in the flash file. (my guess is that it is still configured for some sort of SIT environment.

Bluephlame
Regardless of how the flash file consumes the web service, if I browse directly to the .ASMX in IE, and click on either of the web methods, the host is being shown as internal.domain.com. Is this something I can override in the web.config? If so, where?
Keith
I have seen this before on some of the services I am consuming. The main problem was that the WSDL document was pushing out the wrong domain name. I would check out that to see if that is where the problem is. Either way you should be able to force the client (flash) to connect to the service without really caring about what internal doiman it is listing.
Bluephlame
A: 

I'm not sure of the details of this, but I've seen this complaint with respect to WCF. The answer had to do with setting the host headers in IIS.

It's IIS that passes the host name to ASP.NET or WCF, and it passes the host header when that is configured. If it's not configured, then I suppose it won't send that header as the "host name", even if the client sets that header in the request.

John Saunders
Funny you mention this. I tried setting the host headers in IIS (they're running IIS6) to include www.domain.com and domain.com, and testing this, I received "Bad hostname" just trying to browse to the site. If I was able to correct that issue, do you think this would solve the problem with the web service hostname resolving as the internal domain name?
Keith
It might. Again, I can't find the article I read this in. There was someone asking this question here on SO (for WCF), but I don't know if this is where I saw the answer.
John Saunders