Hello,
When using VB.Net to connect ot a web service, I am getting the error
The underlying connection was closed: Unable to connect to the remote server
What could be causing this?
Thanks! 2 1676
| The underlying connection was closed: Unable to connect to the remote
server
|
| What could be causing this?
a plethura of reasons. catch the specific exception and see if you can get
more details. for us to better help you, it would be in your best interest
to show your code that communicates with the ws and to know other details
about the ws provider...is it a ws that you created or is it something we
can all hit to diagnose this for you...etc.
details posted here will most likely give you more detailed answers to your
delima.
"steve" wrote: | The underlying connection was closed: Unable to connect to the remote server | | What could be causing this?
a plethura of reasons. catch the specific exception and see if you can get more details. for us to better help you, it would be in your best interest to show your code that communicates with the ws and to know other details about the ws provider...is it a ws that you created or is it something we can all hit to diagnose this for you...etc.
details posted here will most likely give you more detailed answers to your delima.
Thanks. Here is my code:
I can't seem to get any more details on the exception. Here's my code
followed by the contents of the wsdl file.
*********************
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim oClass As New Class1
Try
'Call oClass.GetMyCodeStatus("XXXXX", "YYYYY", 2005, 10)
'Call oClass.GerMyCodeProductionDetail("XXXXX", "YYYYY", "11/01/2005",
"11/30/2005", "all", "all", "date", True)
Call oClass.GetCommissionDetails("XXXXX", "YYYYY", "all", "01/01/2005",
"11/30/2005", True)
TextBox1.Text = oClass.XMLReturn
Catch oExc As Exception
MsgBox(oExc.ToString)
End Try
End Sub
End Class
****************************
Public Class Class1
Private MyDevelopment As New WebReference.MyWebServDemo Service
Private msXML As String
Public ReadOnly Property XMLReturn() As String
Get
Return msXML
End Get
End Property
Public Sub GetCommissionDetails(ByVal userid As String, ByVal password As
String, ByVal company As String, ByVal fromDate As String, ByVal toDate As
String, ByVal isRollup As Boolean)
'Dim oExc As Exception
Try
msXML = ""
MyDevelopment.BegingetCommissionDetails(userid, password, company, fromDate,
toDate, isRollup, AddressOf getCommissionDetailsString, Nothing)
Catch oExc As Exception
MsgBox(oExc.ToString)
End Try
End Sub
Private Sub getCommissionDetailsString(ByVal res As IAsyncResult)
Dim rawXml As String = MyDevelopment.EndgetCommissionDetails(res)
msXML = rawXml
End Sub
Public Sub GetMyCodeStatus(ByVal userid As String, ByVal password As String,
ByVal year As Integer, ByVal month As Integer)
msXML = ""
'moForm.Label1.Text = "Retrieving data from: " & vbCrLf & MyProduction.Url()
MyDevelopment.BegingetMyCodeStatus(userid, password, year, month, AddressOf
getMyCodeStatusString, Nothing)
'moForm.ShowDialog()
'Return msXML
End Sub
Private Sub getMyCodeStatusString(ByVal res As IAsyncResult)
Dim rawXml As String = MyDevelopment.EndgetMyCodeStatus(res)
msXML = rawXml
'moForm.Close()
End Sub
Public Sub GerMyCodeProductionDetail(ByVal userid As String, ByVal password
As String, ByVal fromDate As String, ByVal toDate As String, ByVal status As
String, ByVal company As String, ByVal sort As String, ByVal isRollup As
Boolean)
msXML = ""
MyDevelopment.BegingetMyCodeProductionDetails(user id, password, fromDate,
toDate, status, company, sort, isRollup, AddressOf getMyCodeProdDetailString,
Nothing)
End Sub
Private Sub getMyCodeProdDetailString(ByVal res As IAsyncResult)
Dim rawxml As String = MyDevelopment.EndgetMyCodeProductionDetails(res)
msXML = rawxml
End Sub
End Class
****************************
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.MyCode.mywebsite.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://service.MyCode.mywebsite.com"
xmlns:intf="http://service.MyCode.mywebsite.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="http://service.MyCode.mywebsite.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getMyCodeStatus">
<complexType>
<sequence>
<element name="uid" nillable="true" type="xsd:string"/>
<element name="pw" nillable="true" type="xsd:string"/>
<element name="year" nillable="true" type="xsd:string"/>
<element name="month" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getMyCodeStatusResponse">
<complexType>
<sequence>
<element name="getMyCodeStatusReturn" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getMyCodeProductionDetails">
<complexType>
<sequence>
<element name="uid" nillable="true" type="xsd:string"/>
<element name="pw" nillable="true" type="xsd:string"/>
<element name="fromDate" nillable="true" type="xsd:string"/>
<element name="toDate" nillable="true" type="xsd:string"/>
<element name="status" nillable="true" type="xsd:string"/>
<element name="company" nillable="true" type="xsd:string"/>
<element name="sort" nillable="true" type="xsd:string"/>
<element name="isRollup" type="xsd:boolean"/>
</sequence>
</complexType>
</element>
<element name="getMyCodeProductionDetailsResponse">
<complexType>
<sequence>
<element name="getMyCodeProductionDetailsReturn" nillable="true"
type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getCommissionDetails">
<complexType>
<sequence>
<element name="uid" nillable="true" type="xsd:string"/>
<element name="pw" nillable="true" type="xsd:string"/>
<element name="company" nillable="true" type="xsd:string"/>
<element name="fromDate" nillable="true" type="xsd:string"/>
<element name="toDate" nillable="true" type="xsd:string"/>
<element name="isRollup" type="xsd:boolean"/>
</sequence>
</complexType>
</element>
<element name="getCommissionDetailsResponse">
<complexType>
<sequence>
<element name="getCommissionDetailsReturn" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="getCommissionDetailsResponse">
<wsdl:part element="intf:getCommissionDetailsResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getMyCodeProductionDetailsResponse">
<wsdl:part element="intf:getMyCodeProductionDetailsResponse"
name="parameters"/>
</wsdl:message>
<wsdl:message name="getMyCodeStatusRequest">
<wsdl:part element="intf:getMyCodeStatus" name="parameters"/>
</wsdl:message>
<wsdl:message name="getCommissionDetailsRequest">
<wsdl:part element="intf:getCommissionDetails" name="parameters"/>
</wsdl:message>
<wsdl:message name="getMyCodeStatusResponse">
<wsdl:part element="intf:getMyCodeStatusResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getMyCodeProductionDetailsRequest">
<wsdl:part element="intf:getMyCodeProductionDetails" name="parameters"/>
</wsdl:message>
<wsdl:portType name="MyWebServDemo ">
<wsdl:operation name="getMyCodeStatus">
<wsdl:input message="intf:getMyCodeStatusRequest"
name="getMyCodeStatusRequest"/>
<wsdl:output message="intf:getMyCodeStatusResponse"
name="getMyCodeStatusResponse"/>
</wsdl:operation>
<wsdl:operation name="getMyCodeProductionDetails">
<wsdl:input message="intf:getMyCodeProductionDetailsRequest"
name="getMyCodeProductionDetailsRequest"/>
<wsdl:output message="intf:getMyCodeProductionDetailsResponse"
name="getMyCodeProductionDetailsResponse"/>
</wsdl:operation>
<wsdl:operation name="getCommissionDetails">
<wsdl:input message="intf:getCommissionDetailsRequest"
name="getCommissionDetailsRequest"/>
<wsdl:output message="intf:getCommissionDetailsResponse"
name="getCommissionDetailsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyWebServDemo SoapBinding" type="intf:MyWebServDemo ">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getMyCodeStatus">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getMyCodeStatusRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getMyCodeStatusResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getMyCodeProductionDetails">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getMyCodeProductionDetailsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getMyCodeProductionDetailsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getCommissionDetails">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getCommissionDetailsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getCommissionDetailsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyWebServDemo Service">
<wsdl:port binding="intf:MyWebServDemo SoapBinding" name="MyWebServDemo ">
<wsdlsoap:address
location="http://localhost:825/MyCode/services/MyWebServDemo "/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michael R. |
last post by:
Hello,
Ich have some Problems with the call of a WebService!
Situation:
WebService is on the Internetserver
The Webapplikcaion ist on the Intanetserver .... when I call the Webservice...
|
by: Kristof Thys |
last post by:
Hello,
I'm developing a C# - windows forms application. To get some information
for my application, I'm connecting to an URL, wich gives me XML
generated using php.
With 90% of the users, this...
|
by: Luis Esteban Valencia |
last post by:
I have an application on my intranet It works fine there when I copied the
proyect to the server of the Internet it gives me this error.
The arquitecture of my servers are. There is one Server...
|
by: Rajeev Tipnis |
last post by:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;819450
Questions:
1) Is this patch (fix) applicable to the .NET 1.1
Framework as well? That is, if we have Framework 1.1 (On...
|
by: MattM |
last post by:
I am getting the "The underlying connection was closed: Unable to connect to
the remote server" message when trying to connect an ASPX page to a simple
Hello World web service. I have read a few...
|
by: Jim |
last post by:
I have the following code:
Line 35: Dim sURL As String = "http://www.google.com"
Line 36: Dim data As Stream =
client.OpenRead(Server.UrlPathEncode(sURL))
Line 37: ...
|
by: Rahul Anand |
last post by:
As per our requirements we have a web service which internally connects
(Simple HTTP Post Request) to a remote server to initiate some work. We are
calling the web service method asynchronously...
|
by: Monty |
last post by:
OK, I had an issue with this and found lots of advice that did not apply, so
I'm posting what I found hoping it might help someone else. Here's the
sitch: you have a COM app that calls to a .Net...
|
by: nandan |
last post by:
Yes.
My client has a proxy server. That much i know. In my application I
make two kinds of calls that are affected by the proxy server
I finally got the webservice call working.
But my...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |