Speeding up a web service over SSL

D

David Jackson

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
 
T

Teemu Keiski

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
 
D

David Jackson

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
 
T

Teemu Keiski

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.
 
D

David Jackson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top