Shared DLL

Discussion in 'ASP .Net Web Services' started by Bob, Nov 14, 2005.

  1. Bob

    Bob Guest

    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
     
    Bob, Nov 14, 2005
    #1
    1. Advertisements

  2. Bob

    Peter Kelcey Guest

    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
     
    Peter Kelcey, Nov 14, 2005
    #2
    1. Advertisements

  3. Bob

    Bob Guest

    Hi Peter,
    Thank you.
    I shall give it a go.
    regards
    Bob.
    "Peter Kelcey" <> wrote in message
    news:...
    > 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, Nov 15, 2005
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    9,635
  2. DJ Dev
    Replies:
    3
    Views:
    16,450
    Gandalf
    Feb 8, 2004
  3. Joe Fallon
    Replies:
    3
    Views:
    873
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  4. ben
    Replies:
    3
    Views:
    607
    Kevin Spencer
    Nov 15, 2004
  5. H. Simpson
    Replies:
    4
    Views:
    479
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page