Shared DLL

B

Bob

Hi,
I have a DLL that talks to the widget on a comm port. It grabs the comm port
and hold it for the life of the application that invoked it.
With a windows client there is no problem as the appropriate class is only
instantiated once, getting control of the comm port and processing requests
as required.

I want to expose the functionality via a web service.( I am a newbie with
Web services)
What is the best way to way bolt this together? It seems to me that you
can't just reference the DLL in the web service as only one instantiation
can have control of the comm port. Also the initial handshaking to the
widget on the end of the port is timeconsuming and only wants to occur once.

So how do you implement a web service when the functionality can only have
one copy instantiated ? i.e. Stateless Web service married to stateful DLL.
Thanks
Bob
 
P

Peter Kelcey

Bob,

You could instantiate your object in the application_onstart event of
the global.asax file. You could then store the object in an application
variable which would remain stateful for you. You can then reference
this object instance from all of you web services as needed.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top