p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET Web Services (http://p2p.wrox.com/forumdisplay.php?f=102)
-   -   can not connect to the web-service remote server? (http://p2p.wrox.com/showthread.php?t=13034)

okll May 16th, 2004 06:23 AM

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,



okll May 16th, 2004 10:42 PM

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?
------------------

Hal Levy May 17th, 2004 09:30 AM

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

YOONG November 1st, 2004 05:15 AM

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 ;) )




johnchen88 May 24th, 2006 06:08 PM

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



All times are GMT -4. The time now is 03:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.