c# - First call to a .net webservice is slow -
i'm calling .net webservice .net winforms app, both in framework 4.0. during execution of program, first time webservice has method called, call takes ~10-12 seconds. subsequent calls take ~1-2 seconds. subsequent calls, when web reference instance recreated, still ~1-2 seconds. when winforms app restarted, first call delay occurs again, subsequent calls responsive.
the instance of web reference being created prior call occuring, , not part of delay.
xmlserializers winforms app being generated (and used, far know, i'm not sure how verify this).
the delay not occuring because of first-run compilation on webservice side. production webservice being used throughout day, , apppool remaining in memory. far can see, delay occurring either on client side, or between client , server first call, not subsequent calls.
not sure check next. ideas?
as spender had indicated, issue had proxy detection. turning off in internet explorer solved problem, not feasible in situation.
instead, there workaround bypass use of default proxy, , therefore automatic detection.
adding these entries app.config allows urls bypass proxy:
<configuration> <system.net> <defaultproxy> <bypasslist> <add address="server/domain name" /> </bypasslist> </defaultproxy> </system.net> </configuration>
more information can found here: <defaultproxy element> on msdn
Comments
Post a Comment