.Net Web Service and unmanaged DLL

Discussion in 'ASP .Net Web Services' started by P Chase, Mar 26, 2008.

  1. P Chase

    P Chase Guest

    I am writing .Net Web Service using Visual Studio 2005. Part of its
    functionality will be implemented by a C DLL, which I am also writing.
    The Web Service and DLL are separate projects in one Visual Studio
    Solution.

    My question is how best to make the C DLL available to the Web
    Service?

    I have had success "manually" copying the the C DLL to the same
    directory as the Web Service DLL. However, this is horrid for various
    reasons, particularly that Visual Studio seems to keep the DLL open
    all the time, so I cannot replace it with a new one until Visual
    Studio is closed down. This would also seem to preclude simply
    creating a custom build step to copy the C DLL to that directory, as
    this would fall foul of the same problem as the "manual" copying.

    How can I get Visual Studio to make the C DLL available to the Web
    Service automatically?
     
    P Chase, Mar 26, 2008
    #1
    1. Advertising

  2. Locking DLLs is a common issue with anything COM, which is the reason COM
    based web solutions are best clustered. The only way to eliminate this is to
    add another boundary, which means you will be trading off performance for
    the convenience of being able to drop a DLL in place.

    The only other way I know to make it easy is to put the DLLs in COM+, but I
    have never tried the .NET route with this solution. We used this method,
    years ago, with a traditional ASP application and it worked great, but it
    would have to be tested with .NET.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "P Chase" <> wrote in message
    news:...
    >I am writing .Net Web Service using Visual Studio 2005. Part of its
    > functionality will be implemented by a C DLL, which I am also writing.
    > The Web Service and DLL are separate projects in one Visual Studio
    > Solution.
    >
    > My question is how best to make the C DLL available to the Web
    > Service?
    >
    > I have had success "manually" copying the the C DLL to the same
    > directory as the Web Service DLL. However, this is horrid for various
    > reasons, particularly that Visual Studio seems to keep the DLL open
    > all the time, so I cannot replace it with a new one until Visual
    > Studio is closed down. This would also seem to preclude simply
    > creating a custom build step to copy the C DLL to that directory, as
    > this would fall foul of the same problem as the "manual" copying.
    >
    > How can I get Visual Studio to make the C DLL available to the Web
    > Service automatically?
     
    Cowboy \(Gregory A. Beamer\), Mar 26, 2008
    #2
    1. Advertising

  3. P Chase

    P Chase Guest

    On 26 Mar, 14:39, "Cowboy \(Gregory A. Beamer\)"
    <> wrote:
    > Locking DLLs is a common issue with anything COM, which is the reason COM
    > based web solutions are best clustered. The only way to eliminate this is to
    > add another boundary, which means you will be trading off performance for
    > the convenience of being able to drop a DLL in place.
    >
    > The only other way I know to make it easy is to put the DLLs in COM+, but I
    > have never tried the .NET route with this solution. We used this method,
    > years ago, with a traditional ASP application and it worked great, but it
    > would have to be tested with .NET.
    >
    > --
    > Gregory A. Beamer
    > MVP, MCP: +I, SE, SD, DBA
    >
    > Subscribe to my bloghttp://gregorybeamer.spaces.live.com/lists/feed.rss
    >
    > or just read it:http://gregorybeamer.spaces.live.com/
    >
    > *************************************************
    > | Think outside the box!
    > |
    > *************************************************"P Chase" <> wrote in message
    >
    > news:...
    >
    > >I am writing .Net Web Service using Visual Studio 2005. Part of its
    > > functionality will be implemented by a C DLL, which I am also writing.
    > > The Web Service and DLL are separate projects in one Visual Studio
    > > Solution.

    >
    > > My question is how best to make the C DLL available to the Web
    > > Service?

    >
    > > I have had success "manually" copying the the C DLL to the same
    > > directory as the Web Service DLL. However, this is horrid for various
    > > reasons, particularly that Visual Studio seems to keep the DLL open
    > > all the time, so I cannot replace it with a new one until Visual
    > > Studio is closed down. This would also seem to preclude simply
    > > creating a custom build step to copy the C DLL to that directory, as
    > > this would fall foul of the same problem as the "manual" copying.

    >
    > > How can I get Visual Studio to make the C DLL available to the Web
    > > Service automatically?


    Thanks for the reply.

    I am not sure it helps me, though. My C DLL really is just a plain C
    DLL, with some exported C functions. I has nothing to do with COM.

    The main thing I want is for the Web Service project in Visual C++ to
    locate the C DLL automatically. I'd think this should be possible, as
    both the Web Service and the DLL projects are part of same Visual
    Studio Solution.
     
    P Chase, Mar 26, 2008
    #3
    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. Weston Fryatt
    Replies:
    2
    Views:
    1,043
    Weston Fryatt
    Jan 1, 2005
  2. Chris Bardon

    Calling an unmanaged DLL from a web service.

    Chris Bardon, Jun 14, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    196
  3. David Taylor
    Replies:
    0
    Views:
    174
    David Taylor
    Oct 11, 2004
  4. Delf

    Web Service and unmanaged DLL using ADO

    Delf, May 10, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    252
    Lionel LASKE
    May 10, 2005
  5. David Palau

    Strategies for Web Service to Unmanaged DLL

    David Palau, Oct 20, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    169
    David Palau
    Oct 20, 2006
Loading...

Share This Page