473,659 Members | 2,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with instanciating proxy class

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.Journey DataServices proxy = new WsProxy.Journey DataServices(); <--
this line causes the problem
WsProxy.Custome r[] items = proxy.GetCustom ers();

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
Feb 19 '07 #1
2 1466
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).

"Andrew Jackson" <aj******@eccc. co.zawrote in message
news:er******** **@wblv-ip-nnrp-1.saix.net...
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.Journey DataServices proxy = new WsProxy.Journey DataServices();
<-- this line causes the problem
WsProxy.Custome r[] items = proxy.GetCustom ers();

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


Feb 19 '07 #2
I found a solution from information gleamed from this page:
http://www.vmware.com/community/thre...ssageID=581599

cheers
Andrew
"Andrew Jackson" <aj******@eccc. co.zawrote in message
news:er******** **@wblv-ip-nnrp-1.saix.net...
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.Journey DataServices proxy = new WsProxy.Journey DataServices();
<-- this line causes the problem
WsProxy.Custome r[] items = proxy.GetCustom ers();

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


Mar 7 '07 #3

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

Similar topics

11
2500
by: Alexander Stippler | last post by:
Hi, I have a little problem to design some template classes in a realizable way. I have some Container classes and some Proxy classes (proxies for elements). Looks like this: // P is the Proxy class. template <typename T, typename P> class Container {
4
1689
by: Flare | last post by:
OK. I'll try explain my problem so simple as possible. I have to send a complex data type to a WebService from a Asp.net webapplication. My Data type look like this. (A class with a porperty) ------------- namespace Elsam.Turabs.ClassLibraries.TurabsLogExeption{
6
1433
by: ?scar Martins | last post by:
Hi When I'm debugging and somewhere in the code I have a breakpoint, many times when the code after breakpoint finishes and the app returns I can do nothing within in it(it's like freeze)... The app behaves strangely and not accepts any event even close event!!!!! It just lefts for me to stop debugging clicking the respective button in the vs.net toolbar... I don't know if this behaviour is a bug of vs.net or if it's consequence of bad...
3
2345
by: Ohad Young | last post by:
Hi, I have a webservice method that returns an instance of a custom class I created (e.g., bank account). The class definition in the webservice contains properties, overrides Object.ToString method and etc. However, the proxy created for the webservice contains a definition for this class without the code I wrote. Instead it contains only public fields. I understand the reason, interoperability with none .net clients, but is there...
1
1594
by: Smugsboy | last post by:
Hi, I have a problem with a web service proxy written in .NET and used from VS6's C++ as COM object. This proxy works great when used from a .NET application. It does not seem to work when used as COM object for C++ application. What happens is this: I've created a class with the following attribute that inherites from this proxy class. This class is regisered using regasm.exe and installed using
1
1814
by: Steve Lutz | last post by:
I have written a web service to provide some back-end functionality to a Web Site. The web service returns lists of items. If I use the webservice via a browser, it works fine and returns the results in XML. I then created the proxy for the Web Service in VS.NET. I can call the webmethod fine and get an array of Items. (Although it's a local class to the WebSite). When I attempt to have a repeater control list the reults in a web form,...
8
1502
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web service I knocked up: <WebMethod()> _ Public Function HelloWorld() As myType
4
4463
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get this exception: System.Net.WebException: The request failed with HTTP status 407: Proxy Authentication Required. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream...
2
1759
by: Markjan | last post by:
I have a problem with classes and structures in classes (C++) I have to overload operator . class Data { public: class Proxy { //for overload operator Data& _a; int _i; public: Proxy(Data& a, int i) : _a(a), _i(i) {} Data & operator(int j) {
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8629
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.