Click here to Skip to main content
11,480,626 members (65,685 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB service Web
I've been asked to write a web service that will serve many web based clients simultaneously.

I have previously created web services that service only one client.

My web service will connect to a com-object and retrieve data from another application from that com-object.

With a web service being stateless, how can I do this?

There will be a lot of GetFirst / GetNext calls to retrieve data, but I can't figure out how to do this without declaring my variables as shared.

For instance, if I declare the com-object as public in my web service and create it during a InitializeClass call, the com-objects value is NOTHING when I call GetFirst immediately after initializing.


Any help would be greatly appreciated...

Thanks
Posted 6-Sep-12 4:05am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I'm not sure where your problem is. Because a service is stateless as you already note, then dealing with one client or multiple clients makes no difference. COM objects should be instantiated as you need them on an instance by instance basis. Then you'll have no issues.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 294
1 OriginalGriff 190
2 CPallini 150
3 Richard MacCutchan 150
4 CHill60 130
0 Sergey Alexandrovich Kryukov 8,184
1 OriginalGriff 7,556
2 Sascha Lefèvre 3,114
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100