Taking lot of time in loading user control on a web page

  • Thread starter Thread starter Gouri.Mahajan7
  • Start date Start date
G

Gouri.Mahajan7

Hello,

When I press the button on the web page I am loading the user control
on the web page. This user control is invoking some methods of the
web service. The control on the web page is loaded very soon when
running on the local machine ( measns where the web service is
running). But it is taking lot of
time when loaded on the remote machine. Can anybody please explain me
how to solve this problem?

Thanks in advance.

Regards,
Gouri.
 
Hi Gouri,
It is apparent that when you are trying to access the webservice (sitting on
remote machine) thru your code it is taking time. The way to establish if
this is indeed the case is:

Open your browser and type the Url of the Remote webservice and see how much
time does it take to load. Sometimes it might happen that the first request
would take time but the subsequent requests are served faster as the IIS
caches the results.

Is your remote webservice sitting behind a fire wall?

Let me know if it worked for you.

You can reach me on: (e-mail address removed)

regards,
Joy
 
Hello,

I have opened the remote web service and tested. It is not taking much
time as the control is taking to load on the web page. Can you please
tell me what could be other problem.? Thanks.

Regards,
Gouri.
 
Hi,
Can you send me the code snippet please? and also answer the following
questions:

1. The web page hosting the control is sitting on different machine than the
web service?

2. Did you try to debug the web page rendering by placing a breakpoint at
the point where the web service is being called?

regards,
Joy
 
Hello,

1.The web page hosting the control is sitting on different machine
than the web service.
2. Actually web service call is invoked in the user control( which is
C#.net application) . I am hosting that control on the web page. how
to findout the problem.?

Thanks.

Regards,
Gouri.
 
Hi,

1. The web page hosting the control is sitting on different machine
than the web service.

2. Actually the web service call is invoked in the control (which
C#.net application). I am loading the control on the web page. So how
to findout what is and where is exactly the problem.

Thanks.

Regards,
Gouri.
 
Hi Gouri,
It would have been really helpful if you had posted the code (both for
webservice as well as for user control), as then i would have been able to
reproduce the behaviour at my end.

Anyways, i would suggest you to reduce the scope of problem. Do the
following things:
a) Create a sample web application having just one web page. In the code
behind of that page make a call to the webservice ( as you are doing from
within the user control ). Make sure to create this application on the system
that has your current web application with the user control.

b) Then just do a Reponse.Write....for the results returned from Web service
call.

If in this case also you see a latency then we will be sure that we need to
focus in this area, else we will need to decipher your user control
code...from the point it makes the call till the point where it actually
renders itself.

Do let me know.

You can reach me on gtalk on the following mail id: (e-mail address removed)

regards,
Joy
 
Back
Top