Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Timeout when consuming java webservice

10 views
Skip to first unread message

Veerle

unread,
Dec 21, 2011, 12:11:59 PM12/21/11
to v...@norriq.be
Hi,

I wrote a .NET application to consume a https webservice from the
Belgian government for sending excise info to the government. It is
a .NET 2.0 application which uses the web reference feature of visual
studio to generate proxy classes and a service class that inherits
from SoapHttpClientProtocol. Before making the actual webservice call,
I retrieve the correct client certificate from my personal certificate
store using X509Store and I add it to the ClientCertificates
collection of the service class that was generated. This ensurces
sending the public stuff of our client certificate with the request,
because they use that on the server side to see that we are who we say
we are.

When running the application on a Windows XP machine, everything works
fine. When I run the same app, sending the same request, on a Windows
7 machine, the request times out. I tried having a look in Fiddler to
see what happens, but with all the SSL encryption, I don't see that
much.

I tried a lot of things already: upgrade the app to .NET framework 4,
using a service reference instead of a web reference, building my app
in 64bit instead of 32bit, setting keepalive to false. Nothing
helped...

I tried installing SoapUI (java tool to send bare soap requests) and
send the same request from the Windows 7 machine with SoapUI and then
it works. So it has got something to do with the .NET framework that
treats SSL messages different in Windows 7 than in Windows XP and
appearently the server does not like this. Actually, I found a post
from someone with the same symptoms (http://stackoverflow.com/
questions/4511213/httpwebrequest-getrequeststream-breaks-by-timeout-on-
ssl-connection-under-wind) but they solved it by making server
changes. I cannot do that since the server side is not managed by us.
I contacted the government technical helpdesk, but I did't get any
helpful response so far.

The question I am having right now is: can I somehow change my code so
that the SSL request will be send the same way in Windows 7 as it is
in Windows XP? I read somewhere that SSL configuration has become a
lot more strict in Windows 7, so maybe the source of the problem lays
there. I'm wondering if I can change it to less strict (actually, just
the same as in XP) in code or by making adjustements to some Windows
or IE settings?

Any other ideas on stuff to try to get this fixed? Any help would be
much appriciated...

Veerle

unread,
Dec 22, 2011, 4:24:09 AM12/22/11
to
I solved the problem.
I found the solution in this post:
http://stackoverflow.com/questions/5653868/what-makes-this-https-webrequest-time-out-even-though-it-works-in-the-browser
Adding the line ServicePointManager.SecurityProtocol =
SecurityProtocolType.Ssl3; to my code, solved it...
0 new messages