Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2004, 06:23 AM
Registered User
 
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default can not connect to the web-service remote server?


I am a new programmer on webservice.

 now I can program and test them inside in my PC with http://localhost(both aspx files and webservice are in my PC), and can use WSDL.exe to generate proxy class for those webservice on internet, but my program (those files inside Virual directory on my PC) can not link with the webservice on internet!


I download your two program http://www.15seconds.com/issue/020213.htm and http://www.15seconds.com/Issue/020117.htm, they also can not link with those webservice on internet.

I use VS.NET and C# to program and .NET FRAMeSDK 1.1, OS is Window 2000 server, IIS 5, and IE 6 as internet explore.

These web program alway give below erro:

Exception Details: System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.
 Stack Trace:

[WebException: The underlying connection was closed: Unable to connect to the remote server.]
   System.Net.HttpWebRequest.CheckFinalStatus() +673
   System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult asyncResult) +74
   System.Net.HttpWebRequest.GetRequestStream() +132
   System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String methodName, Object[] parameters) +105


-------------------------

My PC inside intranet, but IP is full-ip assigned dynamicaly when login to intranet.

I can not unstand Why "The underlying connection was closed.Unable to connect to the remote server....", I can use IE to my program runing correct on my web-site in ISP, and use WSDL.exe to generate proxy-class in my PC, Why my web-program in localhost can not connect to the remote server?

Thanks ahead for you help,


 
Old May 16th, 2004, 10:42 PM
Registered User
 
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I campareed two programs reslults-- one is in localhost with aspnet, one is consol program, same programs give different results, why? the firewall can distinguish them?

1st, I use http://localhost/quickstart/howto/sa...ebrequest.aspx
only those pages in local host can be received.
for those pages in internet: back webexception:
System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.
0„20„20„2at System.Net.HttpWebRequest.CheckFinalStatus()
0„20„20„2at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
0„20„20„2at System.Net.HttpWebRequest.GetResponse()
0„20„20„2at ASP.webrequest_aspx.btnSubmit_Click(Object sender, EventArgs e)

another is almost same program but run in console mode
quickstart/howto/samples/net/WebRequests/clientGET.cs
or
quickstart/howto/samples/net/WebRequests/clientwebexception.cs

I can get right results!

Why?0„20„2these programs are all .NET 's samples, why give different results?

Who can help me?

if I upload webrequest.aspx to my web site on internet, all OK!

Is it possible for my IIS or proxy server or firewall need some special setting?
------------------
 
Old May 17th, 2004, 09:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I am sure this is related to security.

When you run the local console it's running as you
when you run the internet version it's running as the ASPNET user

The ASPNET user probably needs more rights.



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old November 1st, 2004, 05:15 AM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmm....i have face the same problem before, i am using windows form connect to webservices....you may try this way...

go to IIS right click the Webservices directory choose property, select read, write. go to application setting, execute permission set to script and executable,application protection set to Low(IIS process).

then try to run the .asmx file on IE...
btw, if you connecting it from another PC, please Shut Down your Firewall.(i couldn't connect from other PC when the server running firewall, if anyone have any better idea please advice me ;) )



 
Old May 24th, 2006, 06:08 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We are facing the same issue, can you tell me how you resolve it






Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to the remote server rstelma ASP.NET 2.0 Professional 0 May 30th, 2008 07:56 PM
Need to connect to Remote Exchange Server. arul1976 .NET Framework 2.0 1 March 10th, 2008 10:20 AM
How to connect to a remote SQL Server? mizimizi SQL Server 2000 3 July 4th, 2006 01:47 PM
connect from web server to remote database Durwood Edwards Classic ASP Databases 0 June 24th, 2004 01:03 PM
can't connect to remote server alyeng2000 ASP.NET 1.0 and 1.1 Basics 4 February 9th, 2004 11:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.