Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RE: Using unmanaged code in a Web Service

Reply
Thread Tools

RE: Using unmanaged code in a Web Service

 
 
=?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=
Guest
Posts: n/a
 
      08-09-2004
A friend of mine is having a simlar problem calling a Delphi DLL in a C# web
service. He can call the DLL's functions in a C# Windows project with no
problems. He can call the web service method with no problems if he comments
out the calls to the external DLL functions. When the web service makes a
call to any function in that DLL, the web service crashes. He isn't seeing
anything in the event log though.

Our uneducated guess is that the CLR is crashing and there is some security
isssue calling this DLL. I'll keep you posted when we figure it out. BTW,
putting the DLL in the System32 folder didn't help on this one.

If anyone has any suggestions it would be appreciated.



"CH" wrote:

> I'm trying to use some existing C++ unmanaged code we have on some DLLs in a Web service we're developing. The problem we're having is that aspnet_wp keeps crashing while it is loading the unmanaged DLLs (our code doesn't seem to be actually running at the time of the crash) and all I get is a ping sound and an event "aspnet_wp.exe (PID: 2896) stopped unexpectedly" in the application log...
>
> I tried PInvoke and Managed Wrapper to no avail. Has anyone seen this kind of problem before (and found a solution!)???
>
> TIA
> CH

 
Reply With Quote
 
 
 
 
Bilbo
Guest
Posts: n/a
 
      08-26-2004
Unfortunately, I doubt you will find anyone who can help with this issue.

I have been struggling with calling unmanaged dll functions from a C# Web
Form for months and the only thing I have ever gotten is corroboration of my
story. Yet and still, aspnet_wp performs VERY inconsitently and crashes
fairly randomly. One thing I have noticed is that it seems to continue
growing in memory until you finally have to shut it down. Best advice, don't
mixed managed and unmanaged.

Best of luck.

"Michael R Morgan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> A friend of mine is having a simlar problem calling a Delphi DLL in a C#

web
> service. He can call the DLL's functions in a C# Windows project with no
> problems. He can call the web service method with no problems if he

comments
> out the calls to the external DLL functions. When the web service makes a
> call to any function in that DLL, the web service crashes. He isn't

seeing
> anything in the event log though.
>
> Our uneducated guess is that the CLR is crashing and there is some

security
> isssue calling this DLL. I'll keep you posted when we figure it out.

BTW,
> putting the DLL in the System32 folder didn't help on this one.
>
> If anyone has any suggestions it would be appreciated.
>
>
>
> "CH" wrote:
>
> > I'm trying to use some existing C++ unmanaged code we have on some DLLs

in a Web service we're developing. The problem we're having is that
aspnet_wp keeps crashing while it is loading the unmanaged DLLs (our code
doesn't seem to be actually running at the time of the crash) and all I get
is a ping sound and an event "aspnet_wp.exe (PID: 2896) stopped
unexpectedly" in the application log...
> >
> > I tried PInvoke and Managed Wrapper to no avail. Has anyone seen this

kind of problem before (and found a solution!)???
> >
> > TIA
> > CH



 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=
Guest
Posts: n/a
 
      08-26-2004
This problem ended up being with an ADO connection to a SQL DB inside the
unmanaged DLL. He added a bunch of tracing to narrow down the problem. The
main difficulty was trying to debug a relative blackbox. I can get the
details if anyone is interested.

-mmorgan

"Bilbo" wrote:

> Unfortunately, I doubt you will find anyone who can help with this issue.
>
> I have been struggling with calling unmanaged dll functions from a C# Web
> Form for months and the only thing I have ever gotten is corroboration of my
> story. Yet and still, aspnet_wp performs VERY inconsitently and crashes
> fairly randomly. One thing I have noticed is that it seems to continue
> growing in memory until you finally have to shut it down. Best advice, don't
> mixed managed and unmanaged.
>
> Best of luck.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exposing Unmanaged C++ Windows Service code as a ASP.NET service. =?Utf-8?B?c2h5YW0=?= ASP .Net 2 05-22-2006 01:47 AM
Web Service and unmanaged DLL using ADO Delf ASP .Net Web Services 2 05-10-2005 03:10 PM
Unmanaged DLL fails when called from web service (permissions ?) David Taylor ASP .Net Web Services 0 10-11-2004 04:43 AM
Calling an unmanaged DLL from a web service. Chris Bardon ASP .Net Web Services 3 07-02-2004 01:12 AM
Security problem with Managed Code calling Unmanaged Code in a Web Page GAH ASP .Net Security 0 07-11-2003 06:27 PM



Advertisments