469,926 Members | 2,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

WebService

Hi,
I've done the HelloWorld WebService, installed in a WebServer (INTERNET)
When I call it with Windows App it works, if I use a webform it doesn’t
(INTERNET)
Both of them work in the INTRANET
The code I use is the same, and I have an ISA server.
Can anyone help me please?

Error:"The underlying connection was closed: Unable to connect to the remote
server"
Nov 23 '05 #1
4 2712
Hi MacLanca,

Can you open your web service in IE? Check if you use some proxy settings in IE that prevents resolving your server correctly.

Regards,

Martin Kulov
www.codeattest.com

MCAD Charter Member
MCSD.NET Early Achiever
Nov 23 '05 #2
When you say ISA server, do you mean an HTTP proxy server between your
caller and the service? if so, you need to configure the proxy settings in
your calling program with something like the following:

Service1 svcProxy = new Service1();

// Configure to use an HTTP proxy server for clients behind the firewall
//
System.Net.WebProxy prx = new System.Net.WebProxy("myISAServerName");

// Set to use the current logged in interactive users credentials (works
for winforms interactive apps)
prx.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Assign the HTTP proxy to the SOAP service proxy
svcProxy.Proxy = prx;

When you have a caller behind a firewall and a service on the internet, you
have to have logic in the client accomplish these steps. Different forms
of the System.Net.Credential can be done to work around non-interactive
users (such as web service behind the firewall calling a service on the
internet).

Hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: WebService
thread-index: AcTca1nTBxVV6HLdSnGM4MfxLjqirw==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E=?=" <Ma******@discussions.microsoft.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservic es,microsoft.public.dotnet
.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGXA01.phx.gbl!TK2MSFTNGXA
03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7946
microsoft.public.dotnet.framework.aspnet.webservic es:27070
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,
I've done the HelloWorld WebService, installed in a WebServer (INTERNET)
When I call it with Windows App it works, if I use a webform it doesn’t
(INTERNET)
Both of them work in the INTRANET
The code I use is the same, and I have an ISA server.
Can anyone help me please?

Error:"The underlying connection was closed: Unable to connect to the
remote
server"

Nov 23 '05 #3
Dan,
Thank you for your help, but I've got a few more questions.
Wath's the service1(), webservice itself ?
And why thoes the windows application works(it's behind the firewall to)?

"Dan Rogers" wrote:
When you say ISA server, do you mean an HTTP proxy server between your
caller and the service? if so, you need to configure the proxy settings in
your calling program with something like the following:

Service1 svcProxy = new Service1();

// Configure to use an HTTP proxy server for clients behind the firewall
//
System.Net.WebProxy prx = new System.Net.WebProxy("myISAServerName");

// Set to use the current logged in interactive users credentials (works
for winforms interactive apps)
prx.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Assign the HTTP proxy to the SOAP service proxy
svcProxy.Proxy = prx;

When you have a caller behind a firewall and a service on the internet, you
have to have logic in the client accomplish these steps. Different forms
of the System.Net.Credential can be done to work around non-interactive
users (such as web service behind the firewall calling a service on the
internet).

Hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: WebService
thread-index: AcTca1nTBxVV6HLdSnGM4MfxLjqirw==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E=?=" <Ma******@discussions.microsoft.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservic es,microsoft.public.dotnet
.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGXA01.phx.gbl!TK2MSFTNGXA
03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7946
microsoft.public.dotnet.framework.aspnet.webservic es:27070
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,
I've done the HelloWorld WebService, installed in a WebServer (INTERNET)
When I call it with Windows App it works, if I use a webform it doesn’t
(INTERNET)
Both of them work in the INTRANET
The code I use is the same, and I have an ISA server.
Can anyone help me please?

Error:"The underlying connection was closed: Unable to connect to the
remote
server"

Nov 23 '05 #4
In my sample code, Service1() was the name I chose for the class that
represents the proxy that is generated for the web service. Since I don't
know the name of your web service class, I just took the default. You need
to translate...

I'm not sure I understand your question about a windows application. Isnt'
the windows application calling the web service? Or do you mean you have
an ASP.net web applicaiton that has server side logic that is invoked by a
web-form, and in that logic, you try to call the web service? If this is
the case (the latter, not the former), then you need to supply specific
credentials, since the current credentials won't work for the server side
application (it has a very low-permission identity).

I hope this helps

Dan
--------------------
Thread-Topic: WebService
thread-index: AcTd4x9rPeDHKLXATmOyvfaT7HBSww==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E=?=" <Ma******@discussions.microsoft.com>
References: <BB**********************************@microsoft.co m>
<Ha**************@cpmsftngxa10.phx.gbl>
Subject: RE: WebService
Date: Thu, 9 Dec 2004 03:35:02 -0800
Lines: 78
Message-ID: <EB**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7995
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Dan,
Thank you for your help, but I've got a few more questions.
Wath's the service1(), webservice itself ?
And why thoes the windows application works(it's behind the firewall to)?

"Dan Rogers" wrote:
When you say ISA server, do you mean an HTTP proxy server between your
caller and the service? if so, you need to configure the proxy settings in your calling program with something like the following:

Service1 svcProxy = new Service1();

// Configure to use an HTTP proxy server for clients behind the firewall
//
System.Net.WebProxy prx = new System.Net.WebProxy("myISAServerName");

// Set to use the current logged in interactive users credentials (works
for winforms interactive apps)
prx.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Assign the HTTP proxy to the SOAP service proxy
svcProxy.Proxy = prx;

When you have a caller behind a firewall and a service on the internet, you have to have logic in the client accomplish these steps. Different forms
of the System.Net.Credential can be done to work around non-interactive
users (such as web service behind the firewall calling a service on the
internet).

Hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: WebService
thread-index: AcTca1nTBxVV6HLdSnGM4MfxLjqirw==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E=?=" <Ma******@discussions.microsoft.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 8bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservic es,microsoft.public.dotnet .framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGXA01.phx.gbl!TK2MSFTNGXA 03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7946
microsoft.public.dotnet.framework.aspnet.webservic es:27070
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,
I've done the HelloWorld WebService, installed in a WebServer (INTERNET)
When I call it with Windows App it works, if I use a webform it doesn’t (INTERNET)
Both of them work in the INTRANET
The code I use is the same, and I have an ISA server.
Can anyone help me please?

Error:"The underlying connection was closed: Unable to connect to the
remote
server"


Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Davie | last post: by
1 post views Thread by Nalaka | last post: by
5 posts views Thread by AliR | last post: by
4 posts views Thread by =?Utf-8?B?QmlsbEF0V29yaw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.