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"