473,503 Members | 4,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Speeding up a web service over SSL

Hello,

I'm presently developing a WinForms app in C# (VS.NET 2005) which needs to
interface with a web service running on the company's public Internet site.
The webservice is very simple - it receives a string, looks it up in a SQL
Server database, and returns another string based on the results of the
database query.

Problem now is the amount of time it takes to return a value to the
webservice over SSL.

If I point the WinForms client at the webservice without going over SSL, it
returns in approximately 0.1 seconds e.g.
http://www.xxx.com/webservices/testservice.asmx

However, as soon as I modify the call to the webservice to run over SSL, it
returns in approximately 10.5 seconds e.g.
https://www.xxx.com/webservices/testservice.asmx

Obviously, I expect a slight loss of performance because of the overhead of
SSL, but wasn't expecting it to be quite as bad as this.

When I point a web browser at
https://www.xxx.com/webservices/testservice.asmx, it shows the page almost
instantly, with the Service Description hyperlink and a bulleted list of the
methods contained in the webservice, so I don't think it's a networking
issue.

Similarly, when I point the WinForms client at other commercial webservices
which run over SSL, they seem to return almost instantly.

I've had a bit of a trawl round Google but haven't found anything which
helped to speed things up. One site suggested adding CacheDuration to the
[WebMethod] declaration but that has not helped.

Can anyone please give me any pointers about some things I could try to
speed this up?

Thanks

DJ
Sep 1 '07 #1
6 1901
Have you thought of using something like fiddler to see the packets being
generated? I have a feeling it's a negotionation for authentication that is
causeing the problem. Windows need to validate the ssl certificate.

"David Jackson" wrote:
Hello,

I'm presently developing a WinForms app in C# (VS.NET 2005) which needs to
interface with a web service running on the company's public Internet site.
The webservice is very simple - it receives a string, looks it up in a SQL
Server database, and returns another string based on the results of the
database query.

Problem now is the amount of time it takes to return a value to the
webservice over SSL.

If I point the WinForms client at the webservice without going over SSL, it
returns in approximately 0.1 seconds e.g.
http://www.xxx.com/webservices/testservice.asmx

However, as soon as I modify the call to the webservice to run over SSL, it
returns in approximately 10.5 seconds e.g.
https://www.xxx.com/webservices/testservice.asmx

Obviously, I expect a slight loss of performance because of the overhead of
SSL, but wasn't expecting it to be quite as bad as this.

When I point a web browser at
https://www.xxx.com/webservices/testservice.asmx, it shows the page almost
instantly, with the Service Description hyperlink and a bulleted list of the
methods contained in the webservice, so I don't think it's a networking
issue.

Similarly, when I point the WinForms client at other commercial webservices
which run over SSL, they seem to return almost instantly.

I've had a bit of a trawl round Google but haven't found anything which
helped to speed things up. One site suggested adding CacheDuration to the
[WebMethod] declaration but that has not helped.

Can anyone please give me any pointers about some things I could try to
speed this up?

Thanks

DJ
Sep 1 '07 #2
"wmain" <wm***@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...

Thanks for the reply.
Have you thought of using something like fiddler to see the packets being
generated?
I haven't, because HTTP connectivity is fine. It's only when I try to
connect over HTTPS that it's really slow.

DJ
Sep 1 '07 #3
Well, that was his point- that the SSL handshake is what is taking up all the
time.
You might consider employing some sort of message-level authentication if
you can, and dispense with the SSL. Or, you can encrypt at the message level
and also dispense with the HTTPS protocol.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"David Jackson" wrote:
"wmain" <wm***@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...

Thanks for the reply.
Have you thought of using something like fiddler to see the packets being
generated?

I haven't, because HTTP connectivity is fine. It's only when I try to
connect over HTTPS that it's really slow.

DJ
Sep 1 '07 #4
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:04**********************************@microsof t.com...
Well, that was his point - that the SSL handshake is what is taking up all
the
time.
Yes, but Fiddler wouldn't be able to help me with that because it doesn't
support HTTPS, as far as I can see, or am I incorrect?
You might consider employing some sort of message-level authentication if
you can, and dispense with the SSL. Or, you can encrypt at the message
level
and also dispense with the HTTPS protocol.
OK, that's an interesting thought I hadn't even considered. Thanks very
much.
Sep 1 '07 #5
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.com>
wrote in message
news:04**********************************@microsof t.com...
Yes, but Fiddler wouldn't be able to help me with that because it
doesn't support HTTPS, as far as I can see, or am I incorrect?
Fiddler2 does

http://www.fiddler2.com/fiddler2/
Hans Kesting
Sep 3 '07 #6
"Hans Kesting" <ne***********@spamgourmet.comwrote in message
news:c0**************************@news.microsoft.c om...
>"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.com>
wrote in message
news:04**********************************@microso ft.com...
>Yes, but Fiddler wouldn't be able to help me with that because it
doesn't support HTTPS, as far as I can see, or am I incorrect?

Fiddler2 does

http://www.fiddler2.com/fiddler2/
Thanks for that, and apologies to Peter...
Sep 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2698
by: Snyke | last post by:
Hi. I have a command line script which works really fine, the only problem is that it take *really* long for the first output to be printed on screen. Since I also get some HTTP headers I'm...
12
2188
by: dvumani | last post by:
I have C code which computes the row sums of a matrix, divide each element of each row with the row sum and then compute the column sum of the resulting matrix. Is there a way I can speed up the...
9
3386
by: mfyahya | last post by:
Hi, I'm new to databases :) I need help speeding up select queries on my data which are currently taking 4-5 seconds. I set up a single large table of coordinates data with an index on the fields...
2
1549
by: Robert Wilkens | last post by:
Ok... This may be the wrong forum, but it's the first place I'm trying. I'm new to C# and just implemented the 3-tier Distributed application from Chapter 1 (the first walkthrough) in the...
2
1252
by: OHM | last post by:
I was wondering about this topic and although I accept that different situations call for different solutions, but wondered are there any other solutions and whether has anyone carried out a...
8
1780
by: David Jackson | last post by:
Hello, I'm presently developing a WinForms app in C# (VS.NET 2005) which needs to interface with a web service running on the company's public Internet site. The webservice is very simple - it...
5
1422
by: RobinAG | last post by:
Hello, I just split my database into front and back end. My front end users are experiencing really slow opening of forms. I've searched online for help speeding up forms, but I'm not sure what...
3
1147
by: cj2 | last post by:
I can't remember and can't find my notes anywhere. There were a couple of commands that when used with I think the data adapter that allowed for faster reading or writing of tables. I think one...
0
7193
marktang
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,...
0
7264
Oralloy
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,...
0
7316
jinu1996
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...
0
7449
tracyyun
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...
0
5562
agi2029
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,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.