473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
8 1776
Is there chance it would be connectivity issue? Or are there multiple
requests running when you've tested it? .NET has limit for outbound
connections 2 per specific domain/IP address, but ti shouldn't cause issues
with WinForm clients since there's usually only one conn at any point in
time.

Anyways the previous limit can be configured in

<configuration>
<system.net>
<connectionManagement>
<add address = "http://www.contoso.com" maxconnection = "4" />
<add address = "*" maxconnection = "2" />
</connectionManagement>
</system.net>
</configuration>
-- Teemu Keiski AspInsider, ASP.NET MVP http://blogs.aspadvice.com/joteke
http://teemukeiski.net "David Jackson" <so*****@somewhere.comwrote in
message news:%2****************@TK2MSFTNGP05.phx.gbl...
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
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...

Hi Teemu,

Thanks for the reply.
Is there chance it would be connectivity issue?
I don't think so, since it's very fast when I connect over HTTP. It's only
when I connect over HTTPS that it's slow.
Or are there multiple requests running when you've tested it?
I'm the only person here at the moment. And I wish I wasn't, but that's a
different problem :-)
.NET has limit for outbound connections 2 per specific domain/IP address,
I didn't know that.
but ti shouldn't cause issues with WinForm clients since there's usually
only one conn at any point in time.
Yes. This WinForms makes only one call to this webservice at startup.

DJ
Sep 1 '07 #3
Is the certificate on the site ok? And not self-issued?

Oh, and btw try also other type of clients. Or try from other machines too.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"David Jackson" <so*****@somewhere.comwrote in message
news:uJ****************@TK2MSFTNGP03.phx.gbl...
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...

Hi Teemu,

Thanks for the reply.
>Is there chance it would be connectivity issue?

I don't think so, since it's very fast when I connect over HTTP. It's only
when I connect over HTTPS that it's slow.
>Or are there multiple requests running when you've tested it?

I'm the only person here at the moment. And I wish I wasn't, but that's a
different problem :-)
>.NET has limit for outbound connections 2 per specific domain/IP address,

I didn't know that.
>but ti shouldn't cause issues with WinForm clients since there's usually
only one conn at any point in time.

Yes. This WinForms makes only one call to this webservice at startup.

DJ

Sep 1 '07 #4
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Is the certificate on the site ok?
As far as I can tell. When I open up the site in IE and click on the
padlock, it tells me that GeoTrust thinks the certificate is OK.
And not self-issued?
It better not be, since we paid for it! It says it was issued by Equifax
Secure Certificate Authority.
Oh, and btw try also other type of clients. Or try from other machines
too.
Sorry, I should have mentioned that was one of the checks that I'd already
done. Same thing, unfortunately.
Sep 1 '07 #5
Follow-up also to webservices group.

Teemu

"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Is the certificate on the site ok? And not self-issued?

Oh, and btw try also other type of clients. Or try from other machines
too.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"David Jackson" <so*****@somewhere.comwrote in message
news:uJ****************@TK2MSFTNGP03.phx.gbl...
>"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...

Hi Teemu,

Thanks for the reply.
>>Is there chance it would be connectivity issue?

I don't think so, since it's very fast when I connect over HTTP. It's
only when I connect over HTTPS that it's slow.
>>Or are there multiple requests running when you've tested it?

I'm the only person here at the moment. And I wish I wasn't, but that's a
different problem :-)
>>.NET has limit for outbound connections 2 per specific domain/IP
address,

I didn't know that.
>>but ti shouldn't cause issues with WinForm clients since there's usually
only one conn at any point in time.

Yes. This WinForms makes only one call to this webservice at startup.

DJ


Sep 1 '07 #6
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:u3**************@TK2MSFTNGP03.phx.gbl...
Follow-up also to webservices group.
Thanks. Do you think I should post the original post in there?
Sep 1 '07 #7
That's a good idea
"David Jackson" <so*****@somewhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:u3**************@TK2MSFTNGP03.phx.gbl...
>Follow-up also to webservices group.

Thanks. Do you think I should post the original post in there?

Sep 1 '07 #8
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>Follow-up also to webservices group.

Thanks. Do you think I should post the original post in there?

That's a good idea
OK - I've done it.
Sep 1 '07 #9

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

Similar topics

4
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
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
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
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
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...
6
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
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...
10
by: ags5406 | last post by:
I've created an application that downloads data daily from a secure web site and stores that data in an Access database. Then there are different options for allowing the user to do keyword and...
3
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.