Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Speeding up a web service over SSL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Jackson - 01 Sep 2007 15:16 GMT
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
Teemu Keiski - 01 Sep 2007 17:03 GMT
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 
> Hello,
>
[quoted text clipped - 37 lines]
>
> DJ
David Jackson - 01 Sep 2007 17:27 GMT
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
Teemu Keiski - 01 Sep 2007 17:35 GMT
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.

Signature

Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

> Hi Teemu,
>
[quoted text clipped - 20 lines]
>
> DJ
Teemu Keiski - 01 Sep 2007 18:03 GMT
Follow-up also to webservices  group.

Teemu

> Is the certificate on the site ok? And not self-issued?
>
[quoted text clipped - 26 lines]
>>
>> DJ
David Jackson - 01 Sep 2007 18:24 GMT
> Follow-up also to webservices  group.

Thanks. Do you think I should post the original post in there?
Teemu Keiski - 01 Sep 2007 18:49 GMT
That's a good idea

>> Follow-up also to webservices  group.
>
> Thanks. Do you think I should post the original post in there?
David Jackson - 01 Sep 2007 19:53 GMT
>>> 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.
David Jackson - 01 Sep 2007 18:04 GMT
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.