Internal/External IP addresses

M

Mark Watkin

We have recently put a Web Service on an external web server for testing,
however, when it is added as a reference, it is trying to use the internal
IP address instead of the external IP address.

Does anyone know why this happens, and how it can be fixed?

Cheers
 
M

Mujtaba Syed

Hi Mark:
We have recently put a Web Service on an external web server for testing,
however, when it is added as a reference, it is trying to use the internal
IP address instead of the external IP address.

I haven't understood your question completely but I will take a shot at it.

Don't refresh the web reference. Delete it and create a new one with the
correct external IP address.
You refresh a web reference only when the interface of a service has changed
but its location is the same! This is not true in your case.

Hope this helps.
Mujtaba.
 
M

Mark Watkin

Sorry, I know I wasn't exactly clear, but that was all I was told from the
external developer trying to access our service.
It won't need refreshing because it would be a brand new project.

I posted the question in hopes that somebody might have understood quickly,
so I could resove this today.
However, it looks like I will have to try myself when I can get to an
external connection so I can provide a much more detailed question.

Thanks anyway
Mark
 
D

Dan Rogers

Hi Mark,

IP address resolution is a DNS function. If the URL that your developer us
using resolves in his DNS (or his HOSTS file) to a specific "internal" IP
address, then the change needs to be made in the DNS servers you are using.
Alternately, access the service using the IP address you desire (e.g.
http://123.45.67.89/Myservice.asmx). Another alternative is to register an
alternate server name for the public address. It sounds like someone
registered the wrong IP address if this is happening on public internet.

Regards
Dan Rogers
Microsoft Corporation
--------------------
 
M

Mark Watkin

Thanks, but it doesn't make sense to be DNS, otherwise I wouldn't be able to
access the service at all from externally. Here's the procedure that we have
gone through-
The developer created the webservice on his own machine, and tested it with
a sample Windows application.
We created a new virtual directory on the web server (which is externally
accessible) and copied the necessary files across
We then created another test application using the new server (but from
internally), which worked fine
After going home, I created another test application and added a Web
Reference to the service's external URL
It all came up fine, showing us the test page, so then I clicked the "Add
Reference button", the window disappeared, then a few minutes later, I get a
dialog box stating-

Unable to download following files from .
http://172.16.xxx.xxx/rocket/rocket.asmx?wsdl
Do you want to skip these files and continue?

We have searched all the files, and none of them specify this IP address, or
even has anything like the string "?wsdl"
We were also using the .vsdisco file that visual studio had provided.

Hope this is a bit clearer

Cheers,
Mark
 
D

Dan Rogers

Hi Mark,

You stated that you clicked the add-reference menu selection, and provided
it with the address of a web server. Try clicking the add-web-reference
selection instead. You can't add-reference across HTTP interface.

Dan

--------------------
 
M

Mark Watkin

Sorry, this is *after* clicking the "Add Web Reference" to the project. It
brings up a dialog which has the URL box, a browser interface to view the
URL, and an "Add Reference" button. It was this button that I was refering
to
 
D

Dan Rogers

Ahhh. Is it possible that the service does not support automatic WSDL
serving? This is something you can disable in ASP.net, and is a feature of
ASP.net that not every tool vendor does the same way. If this is the case,
you need to get (by some other means) the WSDL file for the service, save
this locally, and then instead of typing the URL, use the Browse button to
specify a local file.

As a best practice, I have always recommended disabling automatic WSDL
generation for production services. Perhaps this is what you are facing.
The reason is that to run a production quality service, one requires an
understanding of the amount of traffic that you are expecting. In cases
where a service provider has established service level agreements with
contracted calling parties, it is especially important to prevent "casual
use" of a web service.

Try contacting the service provider and getting access to their test
servers (another best practice that helps you keep "in development" traffic
from impacting production users.)

I hope this helps
Dan Rogers
Microsoft Corporation
--------------------
From: "Mark Watkin" <[email protected]>
References: <[email protected]>
<[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top