473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Calling a web service from a remote workstation failed

I have a WIN .NET application that calls a web service to retrieve data.

I deployed the application to a server and configured the webservice. The
webservice and SQL Server 2000 database are on the same server.

I installed the application on the server and everything runs fine. It
simply opens a form and populates it with data via the webservice. The
connection string is:

packet size=4096;integrated security=SSPI;data source=localhost;persist
security info=False;initial catalog=DMS

Since the webservice runs on the same server as SQL Server is installed on,
localhost should suffice as the source, shouldn't it?

Here is the relevant portion of the error message.

************** Exception Text **************

System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.

at System.Net.HttpWebRequest.CheckFinalStatus()

at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult asyncResult)

at System.Net.HttpWebRequest.GetRequestStream()

at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

at OrgEvent.localhost.OrgEventWS.OrgType_DDL()

at OrgEvent.frmOrg.frmOrg_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)

at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Nov 23 '05 #1
7 2050
I believe this is the cause of the problem:

Web Reference URL = http:/localhost/DMSDataWS/OrgEventWS.asmx

Since I develop in one environment and deploy in another environment, how
can I set this dynamically so that the appiclation will compile and, at run
time, resolve the webservice URL.

Bill

"WhiskRomeo" wrote:
I have a WIN .NET application that calls a web service to retrieve data.

I deployed the application to a server and configured the webservice. The
webservice and SQL Server 2000 database are on the same server.

I installed the application on the server and everything runs fine. It
simply opens a form and populates it with data via the webservice. The
connection string is:

packet size=4096;integrated security=SSPI;data source=localhost;persist
security info=False;initial catalog=DMS

Since the webservice runs on the same server as SQL Server is installed on,
localhost should suffice as the source, shouldn't it?

Here is the relevant portion of the error message.

************** Exception Text **************

System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.

at System.Net.HttpWebRequest.CheckFinalStatus()

at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult asyncResult)

at System.Net.HttpWebRequest.GetRequestStream()

at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

at OrgEvent.localhost.OrgEventWS.OrgType_DDL()

at OrgEvent.frmOrg.frmOrg_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)

at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Nov 23 '05 #2
Hello WhiskRomeo,
In yr client application you can set the public url for the proxy to reach
the service.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
www.geniant.com
I believe this is the cause of the problem:

Web Reference URL = http:/localhost/DMSDataWS/OrgEventWS.asmx

Since I develop in one environment and deploy in another environment,
how can I set this dynamically so that the appiclation will compile
and, at run time, resolve the webservice URL.

Bill

"WhiskRomeo" wrote:
I have a WIN .NET application that calls a web service to retrieve
data.

I deployed the application to a server and configured the webservice.
The webservice and SQL Server 2000 database are on the same server.

I installed the application on the server and everything runs fine.
It simply opens a form and populates it with data via the webservice.
The connection string is:

packet size=4096;integrated security=SSPI;data
source=localhost;persist security info=False;initial catalog=DMS

Since the webservice runs on the same server as SQL Server is
installed on, localhost should suffice as the source, shouldn't it?

Here is the relevant portion of the error message.

************** Exception Text **************

System.Net.WebException: The underlying connection was closed: Unable
to connect to the remote server.

at System.Net.HttpWebRequest.CheckFinalStatus()

at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
asyncResult)

at System.Net.HttpWebRequest.GetRequestStream()

at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

at OrgEvent.localhost.OrgEventWS.OrgType_DDL()

at OrgEvent.frmOrg.frmOrg_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)

at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Nov 23 '05 #3
Since I totally new to web services, I did not understand your response. If
you mean something like:

Dim ws As New OrgEvent.OrgEventWS.OrgEventWS
ws.Credentials = System.Net.CredentialCache.DefaultCredentials
ws.Url = "http:/Laser/DMSDataWS/OrgEventWS.asmx"

Where I need to replace the server name "Laser" with appropriate name for
the LAN server of the deployed site.

This solution appears to work, but since this application will run in
serveral organizations, having to provide a separate compiled version for
each site is not a good solution.

Bill

"Dilip Krishnan" wrote:
Hello WhiskRomeo,
In yr client application you can set the public url for the proxy to reach
the service.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
www.geniant.com
I believe this is the cause of the problem:

Web Reference URL = http:/localhost/DMSDataWS/OrgEventWS.asmx

Since I develop in one environment and deploy in another environment,
how can I set this dynamically so that the appiclation will compile
and, at run time, resolve the webservice URL.

Bill

"WhiskRomeo" wrote:
I have a WIN .NET application that calls a web service to retrieve
data.

I deployed the application to a server and configured the webservice.
The webservice and SQL Server 2000 database are on the same server.

I installed the application on the server and everything runs fine.
It simply opens a form and populates it with data via the webservice.
The connection string is:

packet size=4096;integrated security=SSPI;data
source=localhost;persist security info=False;initial catalog=DMS

Since the webservice runs on the same server as SQL Server is
installed on, localhost should suffice as the source, shouldn't it?

Here is the relevant portion of the error message.

************** Exception Text **************

System.Net.WebException: The underlying connection was closed: Unable
to connect to the remote server.

at System.Net.HttpWebRequest.CheckFinalStatus()

at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
asyncResult)

at System.Net.HttpWebRequest.GetRequestStream()

at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

at OrgEvent.localhost.OrgEventWS.OrgType_DDL()

at OrgEvent.frmOrg.frmOrg_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)

at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


Nov 23 '05 #4
Does anyone have a robust solution this problem? For example, can a client
workstation on LAN discover the name of the server hosting the webservice or
search for webservices hosted on the LAN?

Or is hardcoding this in a config file or code the only way?

WR

"WhiskRomeo" wrote:
Since I totally new to web services, I did not understand your response. If
you mean something like:

Dim ws As New OrgEvent.OrgEventWS.OrgEventWS
ws.Credentials = System.Net.CredentialCache.DefaultCredentials
ws.Url = "http:/Laser/DMSDataWS/OrgEventWS.asmx"

Where I need to replace the server name "Laser" with appropriate name for
the LAN server of the deployed site.

This solution appears to work, but since this application will run in
serveral organizations, having to provide a separate compiled version for
each site is not a good solution.

Bill

"Dilip Krishnan" wrote:
Hello WhiskRomeo,
In yr client application you can set the public url for the proxy to reach
the service.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
www.geniant.com
I believe this is the cause of the problem:

Web Reference URL = http:/localhost/DMSDataWS/OrgEventWS.asmx

Since I develop in one environment and deploy in another environment,
how can I set this dynamically so that the appiclation will compile
and, at run time, resolve the webservice URL.

Bill

"WhiskRomeo" wrote:

> I have a WIN .NET application that calls a web service to retrieve
> data.
>
> I deployed the application to a server and configured the webservice.
> The webservice and SQL Server 2000 database are on the same server.
>
> I installed the application on the server and everything runs fine.
> It simply opens a form and populates it with data via the webservice.
> The connection string is:
>
> packet size=4096;integrated security=SSPI;data
> source=localhost;persist security info=False;initial catalog=DMS
>
> Since the webservice runs on the same server as SQL Server is
> installed on, localhost should suffice as the source, shouldn't it?
>
> Here is the relevant portion of the error message.
>
> ************** Exception Text **************
>
> System.Net.WebException: The underlying connection was closed: Unable
> to connect to the remote server.
>
> at System.Net.HttpWebRequest.CheckFinalStatus()
>
> at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
> asyncResult)
>
> at System.Net.HttpWebRequest.GetRequestStream()
>
> at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
> methodName, Object[] parameters)
>
> at OrgEvent.localhost.OrgEventWS.OrgType_DDL()
>
> at OrgEvent.frmOrg.frmOrg_Load(Object sender, EventArgs e)
>
> at System.Windows.Forms.Form.OnLoad(EventArgs e)
>
> at System.Windows.Forms.Form.OnCreateControl()
>
> at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
>
> at System.Windows.Forms.Control.CreateControl()
>
> at System.Windows.Forms.Control.WmShowWindow(Message& m)
>
> at System.Windows.Forms.Control.WndProc(Message& m)
>
> at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
>
> at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
>
> at System.Windows.Forms.Form.WmShowWindow(Message& m)
>
> at System.Windows.Forms.Form.WndProc(Message& m)
>
> at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
>
> at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
>
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
>


Nov 23 '05 #5
Hi WhiskRomeo,

WS-MetadataExchange will provide solution for web service discovering. Until then you can implement a custom solution that crawls a list of servers and asks them by UDDI.

Martin Kulov
http://www.codeattest.com

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
Nov 23 '05 #6
Thanks for the response.

It sounds like you have a solution, but, again, I am totally new to this so
I don't know what you mean by "crawling a list of servers ask them by UDDI."
Is there KB article on this?

The only article I found was about publishing your webservice for public
consumption. We would not want to do that.

wr

"Martin Kulov" wrote:
Hi WhiskRomeo,

WS-MetadataExchange will provide solution for web service discovering. Until then you can implement a custom solution that crawls a list of servers and asks them by UDDI.

Martin Kulov
http://www.codeattest.com

MCAD Charter Member
MCSD.NET Early Achiever
MCSD

Nov 23 '05 #7
Hi WhiskRomeo,

check out UDDI Services [1]. You can publish your web service in your local domain. It is not necessary to make it public.

[1] http://www.microsoft.com/windowsserv...i/default.mspx

Best,
Martin Kulov
http://www.codeattest.com

MCAD Charter Member
MCSD.NET Early Achiever
MCSD
Nov 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be...
8
by: Julia | last post by:
Hi, My client uses a remote object when I host the remote object inside a windows application all seem to work fine but when I host the same object inside a windows service I get the following...
4
by: Brent Waldrop | last post by:
Ok everyone, i have been pulling my hair out on this one. I have been working on it for 3 days with no sucess. This problem is occuring at home where i am running a workgroup. I have Windows 2003...
4
by: Blaxer | last post by:
I have read approximately 30 articles now on various methods to make your vb.net application automatically update itself and I can't see how they apply to a vb.net windows services projects. The...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
3
by: lk | last post by:
I need some help regarding the mechanism to put in place to be able to dynamically update a remote object when the assembly where it is defined is modified, and this whitout having service...
1
by: GM | last post by:
Hello, I need ideas, concepts to realize the following things: I have a service (vb.net) running on a workstation communicating with a client application. The data flow does not need to be...
0
by: asadikhan | last post by:
I need to call a console app (dtexec) from a windows service in a client/server architecture. I have the application setup so that the client application is called with a package name, which makes...
1
by: ssg31415926 | last post by:
Using VS2005 on my workstation, I've created a web service on an external 2003 SP1 dev IIS box. From my workstation, I can get a web reference by pointing it to service.asmx. I've published it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.