Groups | Blog | Home
all groups > dotnet web services > february 2007 >

dotnet web services : Problem with instanciating proxy class


Andrew Jackson
2/19/2007 12:00:00 AM
Hi all...

My app is a .net2 winforms app written in c# using visual studio 2005.

I have added a web reference to (what I consider) a fairly large web
service. When I try to use the web service in my client application via the
autogenerated proxy class, the first time I instanciate my proxy class, it
take almost 3 minutes for the call to complete. all subsequent calls are
instant. this delay is before any actual calls to the web methods.

e.g:

WsProxy.JourneyDataServices proxy = new WsProxy.JourneyDataServices(); <--
this line causes the problem
WsProxy.Customer[] items = proxy.GetCustomers();

I can load the webservice url in a browser and have noticed no problems
there (database connection is working, no obvious security problems, etc)

I understand that the first time the proxy call is called it might cause a
small delay because of JIT compilations and serializers, etc but is 3
minutes really a realistic time for this process? I have tried running
sgen.exe on my assembly but it did not seem to product any significant
reduction. maybe i;m doing something wrong?

Any ideas anyone?

Thanks,
Andrew

Andrew Brook
2/19/2007 12:00:00 AM
Perhaps the webservice is to blame for the delay?
If the webservice shuts down after a period of innactivty, and if it does a
lot of work on startup (caching data etc).

[quoted text, click to view]

Andrew Jackson
3/7/2007 12:36:54 PM
I found a solution from information gleamed from this page:
http://www.vmware.com/community/thread.jspa?messageID=581599

cheers
Andrew


[quoted text, click to view]

AddThis Social Bookmark Button