Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2008

Tip: Looking for answers? Try searching our database.

Issue using an unmanaged dll in a ASP.Net 2.0 Webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
austirob - 27 Feb 2008 07:37 GMT
Hi,



Any help with this problem would be greatly apprecicated as it is driving me
insane.



I have an ASP.NET 2.0 Webservice running on Windows server 2003. The
webservice calls a function in a legacy (unmanaged) C++ .dll which takes an
XML string and returns an XML string. It all works rather nicely most of the
time.



However, if the service isn't used for a while, when I call the function, I
get the old "Unable to load DLL" error. If I then restart the webservice, it
starts working again.



Here is my dll import declaration:



[DllImport(@"C:\GridVersion\CLibDll.dll", CallingConvention =
CallingConvention.StdCall)]

public static extern void calculateRequestFromDotNet(StringBuilder request,
StringBuilder response);





Any ideas on how I can even begin to resolve this issue would be
really,really  appreciated.



Many thanks



Rob
Tiago Halm - 01 Mar 2008 02:02 GMT
When you know you'll get the error (I suspect its when w3wp.exe is not
running) and before you perform the first call, make sure you run
filemon.exe and check where the native dll is being probed for when the call
is made.

Tiago Halm

> Hi,
>
[quoted text clipped - 30 lines]
>
> Rob

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.