RE: Using unmanaged code in a Web Service

Discussion in 'ASP .Net' started by =?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=, Aug 9, 2004.

  1. 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
     
    =?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=, Aug 9, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=

    Bilbo Guest

    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" <> wrote in message
    news:...
    > 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
     
    Bilbo, Aug 26, 2004
    #2
    1. Advertising

  3. 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.
    >
     
    =?Utf-8?B?TWljaGFlbCBSIE1vcmdhbg==?=, Aug 26, 2004
    #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. =?Utf-8?B?c2h5YW0=?=
    Replies:
    2
    Views:
    706
    =?Utf-8?B?c2h5YW0=?=
    May 22, 2006
  2. GAH
    Replies:
    0
    Views:
    497
  3. Chris Bardon

    Calling an unmanaged DLL from a web service.

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

    Web Service and unmanaged DLL using ADO

    Delf, May 10, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    230
    Lionel LASKE
    May 10, 2005
Loading...

Share This Page