Click here to Skip to main content
12,396,461 members (34,298 online)
Rate this:
 
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 3: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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2016
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