473,385 Members | 1,343 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,385 software developers and data experts.

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 2876
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just...
6
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a...
1
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS)...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
7
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
5
by: | last post by:
Hi, How long do webservice objects live for? In particular, if i have static variables filled with data from a static constructor in a webservice, how long will that data persist? thxs
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
4
by: =?Utf-8?B?QmlsbEF0V29yaw==?= | last post by:
Hi, We recently converted a 1.1 project to 2.0 and this included a webservice which accepted XML for one of the parameters. Since converting to 2.0 I am getting the following message: --- A...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.