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?
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.

Signature
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!
*************************************************
>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.
[quoted text clipped - 14 lines]
> How can I get Visual Studio to make the C DLL available to the Web
> Service automatically?
P Chase - 26 Mar 2008 16:36 GMT
On 26 Mar, 14:39, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> 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
[quoted text clipped - 35 lines]
> > 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.