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!
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!