469,900 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

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 1856
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mark | last post: by
4 posts views Thread by Brent Waldrop | last post: by
7 posts views Thread by Jorgen Haukland, Norway | last post: by
1 post views Thread by GM | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.