Pocket pc and Web Sevices

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi, I have created a mobile application(WM5) that uses Web Service.
First of all:
In my client I add web reference and I create an istance of my proxy in the
constructor. Should it be the only one instance?Or, should I create an
istance of proxy before each call to web service and then to destroy it?Is
better to use the instruction "using" in this case?
Problem:
When I test my application in the emulator it works fine, but if I deploy
it in my Asus a636, during application utilization, exception is raised.
Exception isn't raised during a specific operation but is randomly raised
during web methods call. The exception is always the same: Impossible
connect to remote server. Why??
P.s. I'm using visual studio 2005, compact framework 2.0 sp1 and ActiveSync
4.2.
Thanks.
Sam.
 
I have partially resolved the problem. If I deploy without debug application
works fine. If I wanto to debubg my application the error occours...
Bye.
 
Sam said:
Hi, I have created a mobile application(WM5) that uses Web Service.
First of all:
In my client I add web reference and I create an istance of my proxy in
the constructor. Should it be the only one instance?Or, should I create an
istance of proxy before each call to web service and then to destroy it?



As long as the proxy instance reference stays in scope no need to create the
proxy every time you call, just once. However, note that the web service
"instance" does not preserve its state between calls (unless you do so
explicitly), but it behaves as if every time you call it you work with
another instance.

Denis Gerina
MCAD, MCSD, MCDBA, MCT
 
Back
Top