Error downloading web service from new URL

H

Henry

Hi,

we develop .NET solutions using Visual Studio .NET 2003 and Framework 1.1.

In an ASP.NET project we have some aspx-pages and one webservice (named:
XPWebservice). We develop the project in a special development directory of
the virtual root (lets say: name is 'DevProject', so location is

c:\inetpub\wwwroot\DevProject).

We also have a windows forms application that calls some web methods of
XPWebservice. For this reasan we defined a dynamic webreference to the web
service using the URL

http:\localhost\DevProject\XPWebservice.asmx.

As the deployment directory will be different from 'DevProject' (lets say
name is 'AppName'), we set the URL dynamically by parsing the configuration
file of the WinForm application:

Friend pv As XPWS.XPWebservice

.... and in form load event:

' get instance of webservice
pv = New XPWS.XPWebservice

' reset the webservice URL to the URL in config file
pv.Url =
ConfigurationSettings.AppSettings.Get("New_URL_of_.XPWebservice")
pv.Discover()


This works really fine, as long as we set the URL of the web reference to
http:\localhost\DevProject\XPWebservice.asmx.

After installing the ASP.NET application in the application directory, the
ASP.NEt pages work fine. Testing the methods of the web service

http:\localhost\AppName\XPWebservice.asmx

with the browser also works fine for all methods. But running the windows
forms application always produces the error

"Error downloading http:\localhost\AppName\XPWebservice.asmx"

when calling pv.Discover() of the web service object.

For your help in this problem many thanks in advance!
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top