.NETGURU
The underlying connection as closed: Could not establish secure channel for SSL/TLS
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.aspnet.webservices.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Ghislain Tanguay
Ok, I try to communicate with a web service who receive xml message under a
https using SSL.

I have a directory with 240 XML files on my desktop. I loop into it to send
each file one by one.

Abritrary, after 10, 15, 56, 79.... files, (sometimes I can pass all of
them??? ) I receive this error :

The underlying connection as closed: Could not establish secure channel for
SSL/TLS

I tried to connectiong to the webservice once for all the files, then i
tried to open a connection for
every file, same result.

Anyone have an idea of what's going on? Is it my code or the webservice?

Tks

Here is my code.

//////////////////////////////////// MessagerieService class generate by
WSDL ////////////////////////////////////////////////

Public Sub New(ByVal _Url As String, ByVal _UserName As String, ByVal
_PassWord As String)
MyBase.New()
Me.Url = _Url
Me.Credentials = New NetworkCredential(_UserName, _PassWord)
strNomUtil = _UserName
strMotPs = _PassWord
End Sub

<System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace:="urn:Messagerie", ResponseNamespace:="urn:Messagerie")> _
Public Function SendindMessage(ByVal nomFile As String, _
ByVal msg As String) _
As
<System.Xml.Serialization.SoapElementAttribute("result")> String

Dim results() As Object = Me.Invoke("SendindMessage", New Object()
{nomFile, msg})
Return CType(results(0), String)

End Function

////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

This is my class who encapsulate the proxy class

////////////////////////////////////////////////////// ServiceWeb Class
//////////////////////////////////////////////////////////

Public Sub New(ByVal _Url As String, _
ByVal _NomUtil As String, _
ByVal _MotPs As String)

strUrl = _Url
strUtil = _NomUtil
strMotPs = _MotPs
End Sub

Public Function SendindMessage(ByVal _nomFile As String, ByVal _msg As
String) As String

msg = New MessagerieService(strUrl, strUtil, strMotPs)
Return msg.SendindMessage(_nomFile, _msg)

End Function

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////

/////////////////////////////////////////////// My form who call my
ServiceWeb ////////////////////////////////////////////////////////

Private Sub SendindMessage(ByVal _Fichier() As String)
Dim intFile As Integer = _Fichier.Length
Dim intCtr As Integer
Dim strTest As String

For intCtr = 0 To intFile - 1
Try
Dim sr As New StreamReader(File.OpenRead(_Fichier(intCtr)))
Dim msg As New ServiceWeb(txtUrl.Text,
txtNomUtilisateur.Text, txtMotPasse.Text)
txtIdMessage.Text = msg.SendindMessage(txtNomDeFile.Text,
sr.ReadToEnd)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Next
MessageBox.Show("Success")
End Sub

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////

Reply to this message...
 
    
Feroze [msft] (VIP)
What is the webserver which is hosting the webservice ?

feroze
======================
This posting is provided as-is. It offers no warranties and confers no
rights.

"Ghislain Tanguay" <Click here to reveal e-mail address> wrote in
message news:Click here to reveal e-mail address...
> Ok, I try to communicate with a web service who receive xml message under
a
[Original message clipped]

Reply to this message...
 
    
Ghislain Tanguay
The web server is as Java web server

https://wsa.sei.pes.qc/sei/servlet/rpcrouter

"Ghislain Tanguay" <Click here to reveal e-mail address> a écrit dans
le message de news:Click here to reveal e-mail address...
> Ok, I try to communicate with a web service who receive xml message under
a
[Original message clipped]

Reply to this message...
 
    
suresh g (VIP)
I have the same problem. Any suggestions are welcome.

Thanks
Suresh

"Ghislain Tanguay" wrote:

[Original message clipped]

Reply to this message...
 
 
System.IO.File
System.IO.StreamReader
System.Net.NetworkCredential
System.Web.Services.Protocols.SoapRpcMethodAttribute
System.Windows.Forms.MessageBox
System.Xml.Serialization.SoapElementAttribute




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification