Error occured when i am using ASP.net to consume my local WebServices

webdevelopex

Newcomer
Joined
Sep 8, 2004
Messages
1
<b>When i use ASP.net consume my local web service, the error occured like this:</b>

The underlying connection was closed: Unable to connect to the remote server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 40: <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/WebService1/Service1/HelloWorld", RequestNamespace:="http://tempuri.org/WebService1/Service1", ResponseNamespace:="http://tempuri.org/WebService1/Service1", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Line 41: Public Function HelloWorld() As String
<b>Line 42: Dim results() As Object = Me.Invoke("HelloWorld", New Object(-1) {})</b>
Line 43: Return CType(results(0),String)
Line 44: End Function


Source File: c:\inetpub\wwwroot\WebService1\Web References\localhost\Reference.vb Line: 42

Stack Trace:


[WebException: The underlying connection was closed: Unable to connect to the remote server.]
System.Net.HttpWebRequest.CheckFinalStatus() +673
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +75
System.Net.HttpWebRequest.GetRequestStream() +132
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +105
WebService1.localhost.Service1.HelloWorld() in c:\inetpub\wwwroot\WebService1\Web References\localhost\Reference.vb:42
WebService1.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebService1\WebForm1.aspx.vb:34
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


<b>When i run Visual Studio.net debug tool. It show this error</b>

An unhandled exception of type 'System.IO.IOException' occurred in Unknown Module.

Additional information: Unable to create a transport connection.

<b>if i run the aspx or the asmx file independently, both are ok, but when my aspx page trying to call the web service. the problem will occured. Previously, my project is ok. But suddenly came out this problem. Therefore, i copied my project to my friend's PC and run on his Server. It works fine! no error. That's mean my code is ok. But something wrong with the window's services or configuration. i am using Window XP Professional.</b>
<b>Can anyone tell me how to fix this problem, i thought it was my IIS or .NetFramework's problem. after i re-installed IIS and .NetFramework, the same problem still exist. And my Visual Studio Debug tool does not work now. How can i configure it to run the debug tool?

when i run debug tool, it will say:</b>


"Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged"

hope to hear from your solution, thank you:)
 
Back
Top