dllimport and web services

Discussion in 'ASP .Net Web Services' started by Will, Mar 14, 2005.

  1. Will

    Will Guest

    I have an C#/ASP.Net 1.1 Web Service that has an exposed Web Method
    that uses an unmanaged DLL via the DllImport Attribute. Is one copy of
    the DLL loaded per call to the Web Method, or does ASP.Net use the same
    instance of the DLL for every call to the Web Method? My guess is that
    due to the "static" keyword required by the DllImport attribute
    indicates that only one copy is used for all requests.

    The creator of the DLL has doubts that it is thread-safe, and would
    like me to ensure that a new copy of the DLL is loaded with each call
    to the web method. Is there a way to force the web service to use a
    fresh copy?

    The Web Service runs on a Win2k Server PC under IIS 5.

    Thanks,
    Will.
    Will, Mar 14, 2005
    #1
    1. Advertising

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. Stephen Richardson

    DllImport and structures containing char[]

    Stephen Richardson, Aug 20, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,150
    Stephen Richardson
    Aug 20, 2003
  2. Michael Tissington

    DLLImport and Unable to Load DLL

    Michael Tissington, Sep 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    9,483
    Michael Tissington
    Sep 11, 2003
  3. =?Utf-8?B?c29ueXJhbQ==?=

    dllimport makes the aspnet application hangs

    =?Utf-8?B?c29ueXJhbQ==?=, Aug 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    564
    =?Utf-8?B?c29ueXJhbQ==?=
    Aug 10, 2004
  4. Billy Zhang
    Replies:
    9
    Views:
    563
    Jialiang Ge [MSFT]
    Jun 19, 2008
  5. Alfred B. Thordarson

    DllImport and WebMethod and STAThread

    Alfred B. Thordarson, Dec 1, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    324
    Alfred B. Thordarson
    Dec 2, 2003
Loading...

Share This Page