Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WebException while calling Web Service over HTTPS...

Reply
Thread Tools

WebException while calling Web Service over HTTPS...

 
 
Mark
Guest
Posts: n/a
 
      09-01-2004
I'm having an issue calling a Web Service (This is an 3rd party Web Service
and I have no control/access to it) via HTTPS. We have talked to the
developers and they said their Web Services are working from their end. When
I call their Web Service, though, I keep getting this error:

Web Exception occurred!
Status:SecureChannelFailure
Entire Error Information:System.Net.WebException: The underlying connection
was closed: Could not establish secure channel for SSL/TLS. --->
System.IO.IOException: Unable to write data to the transport connection. --->
System.IO.IOException: Unable to write data to the transport connection. --->
System.Net.Sockets.SocketException: A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32
size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32 size)
at System.Net.TlsStream.InnerWrite(Boolean async, Byte[] buffer, Int32
offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(HttpWebReque st httpWebRequest)
--- End of inner exception stack trace ---
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

The code used to work. About 2-3 weeks ago, I used the same code and it
worked. I had to change the application to add some functionality, but
didn't change the function that called the Web Service. For the past few
days, no matter what I tried, I can't get it to work.

I've read many news articles...
1. I've overloaded GetWebRequest to set the KeepAlive to False.
2. I've created a Certificate Policy to bypass any Certificate issues.

Does anyone have any ideas?

--
Mark Remkiewicz
Systems Architect
 
Reply With Quote
 
 
 
 
[MSFT]
Guest
Posts: n/a
 
      09-01-2004
Hi Mark,

Did the problem occur with all your clients? If so, you may check if they
made any changes on server side. By default, .Net Framework 1.1 supports
only SSL 3.0 protocol. If the webserver is using SSL 2.0 or TLS 1.0,
HttpWebRequest/WebRequest clase will fails. Additionally, you may check if
there is any proxy/firewall between the client and server and if they
changed recently.

Luke

 
Reply With Quote
 
 
 
 
[MSFT]
Guest
Posts: n/a
 
      09-02-2004
Hello,

Did all your client computer generate such an error? Also, did the problem
occur with all your applications or just one? Is there any other
information recorded in the event log?

Luke

 
Reply With Quote
 
Feroze [msft]
Guest
Posts: n/a
 
      09-02-2004
Hi!

One thing to do would be to set a certificate policy on the webservice
proxy, and see what exact error code you are getting back from the ssl
handshake. THat errorcode will give you a clue as to what is going wrong in
the ssl handshake.

feroze.
=============
this posting is provided as-is.
=============

"Mark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I only have two client workstations that utilizes this application and

both
> of them give the same error. Nothing stands out in my event logs. The

only
> event I have suspicions about is:
>
> Event Type: Failure Audit
> Event Source: Security
> Event Category: Object Access
> Event ID: 560
> Date: 9/2/2004
> Time: 2:44:09 PM
> User: <My Computer>\<My Account>
> Computer: <My Computer>
> Description:
> Object Open:
> Object Server: Security
> Object Type: Key
> Object Name: \REGISTRY\MACHINE\SOFTWARE\Microsoft\COM3
> Handle ID: -
> Operation ID: {0,1017235}
> Process ID: 2016
> Image File Name: C:\Program Files\Common Files\Microsoft
> Shared\VS7Debug\mdm.exe
> Primary User Name: <My Computer>$
> Primary Domain: REMOTE
> Primary Logon ID: (0x0,0x3E7)
> Client User Name: remkm01
> Client Domain: <My Computer>
> Client Logon ID: (0x0,0x18AF5)
> Accesses: READ_CONTROL
> Unknown specific access (bit 0)
> Unknown specific access (bit 3)
> Unknown specific access (bit 4)
>
> Privileges: -
> Restricted Sid Count: 0
>
> Other than that...
>
> Mark
>
> "[MSFT]" wrote:
>
> > Hello,
> >
> > Did all your client computer generate such an error? Also, did the

problem
> > occur with all your applications or just one? Is there any other
> > information recorded in the event log?
> >
> > Luke
> >
> >



 
Reply With Quote
 
[MSFT]
Guest
Posts: n/a
 
      09-03-2004
Hi Mark,

it may be hard to finf a SLL packet sniffer. Since the error is very
randomly, it is mostly like a network issue or server issue. Is it possible
to perform some logs on server side to record every request to the server?
Is the server a IIS?

Luke

 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      09-03-2004
The server is controlled by a third party, so having access or creating a log
for every transaction is almost impossible. We have notified the third party
of our problems, but their response is "There is nothing wrong with our
system, because there are others using the same system without any problems."
Unfortunately, we have to use their systems (the third party that I'm
referring to is a department of the Government). What I have gathered so far
is yes, their server is running IIS and the web service was built with .Net.
Other than that, I don't know. We have asked about their environment, but
due to security reasons, they will not give us any details about their
systems (this is reasonable in my eyes, thinking security, but this is makes
troubleshooting very difficult). I’m trying to make a case that it is not us
that is having a problem, but I have to prove that.

Mark

"[MSFT]" wrote:

> Hi Mark,
>
> it may be hard to finf a SLL packet sniffer. Since the error is very
> randomly, it is mostly like a network issue or server issue. Is it possible
> to perform some logs on server side to record every request to the server?
> Is the server a IIS?
>
> Luke
>
>

 
Reply With Quote
 
Suresh G
Guest
Posts: n/a
 
      09-03-2004
Mark/Luke,

I have the similar issue. I am calling a web method through HTTPS. 50% of
the times the web method call is successful other times it fails with the
exception - "The underlying connection was closed: Could not establish secure
channel for SSL/TLS".

We have a retry mechanism for this when it fails, during the retry mechanism
it succeeds after 2 to 3 retries. I am not implementing the
ICertificatePolicy interface. But would like to know why the webservice
failure/success is not consistent. Is it something to do with IIS/Internet
Explorer configurations?

BTW, I am using a C# client and C++ Web service (SOAP).

Thanks
Suresh


"Mark" wrote:

> The server is controlled by a third party, so having access or creating a log
> for every transaction is almost impossible. We have notified the third party
> of our problems, but their response is "There is nothing wrong with our
> system, because there are others using the same system without any problems."
> Unfortunately, we have to use their systems (the third party that I'm
> referring to is a department of the Government). What I have gathered so far
> is yes, their server is running IIS and the web service was built with .Net.
> Other than that, I don't know. We have asked about their environment, but
> due to security reasons, they will not give us any details about their
> systems (this is reasonable in my eyes, thinking security, but this is makes
> troubleshooting very difficult). I’m trying to make a case that it is not us
> that is having a problem, but I have to prove that.
>
> Mark
>
> "[MSFT]" wrote:
>
> > Hi Mark,
> >
> > it may be hard to finf a SLL packet sniffer. Since the error is very
> > randomly, it is mostly like a network issue or server issue. Is it possible
> > to perform some logs on server side to record every request to the server?
> > Is the server a IIS?
> >
> > Luke
> >
> >

 
Reply With Quote
 
[MSFT]
Guest
Posts: n/a
 
      09-06-2004
Hi Mark,

After check the documents, I found similar issues were resolved by appling
service pack on the server or reinstall the client certificate. From your
previous message, it seems the problem disppearred recently. Did it occur
now? When it occur, you may try to browse a HTML file in the same folder
with HTTPS, if this also failed, I believe it is almost a server issue.

Luke

 
Reply With Quote
 
Yan-Hong Huang[MSFT]
Guest
Posts: n/a
 
      09-09-2004
Hello Suresh,

I was reviewing the issue thread. How is everything going? If you feel
there is any we can do, please feel free to post here and we will follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      09-09-2004
Luke,
Sorry for the late reply. I wanted to run more tests. Fortunately,
everything mysteriously started working and I haven't had any problems since
the last post (knock on wood...). Unfortunately, we couldn't ascertain what
the cause was. The third party still claims nothing has changed on their
side (including reboots). Hopefully sometime today, we will promote the code
to production and find out if we will have any problems. I will post the
results when this happens.

Thanks,
Mark Remkiewicz

"[MSFT]" wrote:

> Hi Mark,
>
> After check the documents, I found similar issues were resolved by appling
> service pack on the server or reinstall the client certificate. From your
> previous message, it seems the problem disppearred recently. Did it occur
> now? When it occur, you may try to browse a HTML file in the same folder
> with HTTPS, if this also failed, I believe it is almost a server issue.
>
> Luke
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
System.Net.WebException making web service calls about 10% of the time. Chris Langston ASP .Net Web Services 4 09-07-2004 10:03 PM
System.Net.WebException when calling a webservice atip ASP .Net Web Services 15 06-24-2004 09:22 AM



Advertisments