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
Peter Kelcey - 14 Nov 2005 21:50 GMT
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
Bob - 15 Nov 2005 01:45 GMT
Hi Peter,
Thank you.
I shall give it a go.
regards
Bob.
> Bob,
>
[quoted text clipped - 4 lines]
>
> Peter