473,803 Members | 3,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2916
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.WebP roxy prx = new System.Net.WebP roxy("myISAServ erName");

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

// 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.Cred ential 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: AcTca1nTBxVV6HL dSnGM4MfxLjqirw ==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E =?=" <Ma******@discu ssions.microsof t.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.aspnet.webs ervices,microso ft.public.dotne t
.framework.webs ervices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED02.phx.gbl!TK 2MSFTNGXA01.phx .gbl!TK2MSFTNGX A
03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7946
microsoft.publi c.dotnet.framew ork.aspnet.webs ervices:27070
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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.WebP roxy prx = new System.Net.WebP roxy("myISAServ erName");

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

// 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.Cred ential 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: AcTca1nTBxVV6HL dSnGM4MfxLjqirw ==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E =?=" <Ma******@discu ssions.microsof t.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.aspnet.webs ervices,microso ft.public.dotne t
.framework.webs ervices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED02.phx.gbl!TK 2MSFTNGXA01.phx .gbl!TK2MSFTNGX A
03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7946
microsoft.publi c.dotnet.framew ork.aspnet.webs ervices:27070
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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: AcTd4x9rPeDHKLX ATmOyvfaT7HBSww ==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E =?=" <Ma******@discu ssions.microsof t.com>
References: <BB************ *************** *******@microso ft.com>
<Ha************ **@cpmsftngxa10 .phx.gbl>
Subject: RE: WebService
Date: Thu, 9 Dec 2004 03:35:02 -0800
Lines: 78
Message-ID: <EB************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path: cpmsftngxa10.ph x.gbl!TK2MSFTNG XA03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7995
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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.WebP roxy prx = new System.Net.WebP roxy("myISAServ erName");

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

// 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.Cred ential 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: AcTca1nTBxVV6HL dSnGM4MfxLjqirw ==
X-WBNR-Posting-Host: 213.41.107.71
From: "=?Utf-8?B?TWFjTGFuY2E =?=" <Ma******@discu ssions.microsof t.com>
Subject: WebService
Date: Tue, 7 Dec 2004 06:45:10 -0800
Lines: 10
Message-ID: <BB************ *************** *******@microso ft.com>
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.publi c.dotnet.framew ork.aspnet.webs ervices,microso ft.public.dotne t .framework.webs ervices
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.1.29
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED02.phx.gbl!TK 2MSFTNGXA01.phx .gbl!TK2MSFTNGX A 03.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :7946
microsoft.publi c.dotnet.framew ork.aspnet.webs ervices:27070
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
425
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 connecting directly with a SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet back, and does exactly the same actions as the normal-Method does. The difference are enormous in my opinion: 1 record:
6
768
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 .NET Framework application, but just not on the .NET CF version. Can anyone suggest anything that might be wrong with the code? (I could post the app and webservice, but i was hoping that you might have noticed something from the supplied...
1
2113
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) First project is a webService. Second consumes the webservices by the first.
2
5714
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 webbrowser controls on it. Besides that i'm using the firewall client for isa server 2004 and it seems that the browsers aren't able to pass thru it... if i disable the firewall the browsers work fine, if i don't, the 2 browsers just stay there...
7
2029
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
2929
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 out to create a "DataSet" as the return type from the webservice?
5
3799
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 about one of the object wanting to extend MarshalByRefObject object, and I get an error SDL1030. I can use the webservice in a C# project just fine but not the C++. Can anyone help me out with this?
5
6279
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
2682
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; using System.Web; using System.Web.Services; using System.Web.Services.Protocols;
4
8063
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 potentially dangerous Request.Form value was detected from the client (myparam="<root><blah...."). --- The fix used for ASPX pages is to include the @Page directive with
0
9565
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10550
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.