dllimport makes the aspnet application hangs

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

  1. As our application design requires us to use one of the validation API engine
    which was written on C(so basically all I have is a dll) and I tested calling
    the functions using small windows application using DllImport for each
    functions and it works without any problem. But when I try to use the same
    Dll in my asp.net web application, it hangs with the first call. I tried
    giving the dll path as a hardcoded path like C:\validation.dll in my
    dllimport funciton call but did not help.

    I am wondering it has something to do with ASPNET account security. So I
    gave full control for ASPNET account for my application directory and still
    my application hangs.

    Anybody faced this earlier?
    =?Utf-8?B?c29ueXJhbQ==?=, Aug 9, 2004
    #1
    1. Advertising

  2. You might try running FileMon from http://www.sysinternals.com and
    use it to monitor all file access activities on your machine. It should give
    you an idea of what's going on with your DLL. My guess is that you are on
    the right track. If you can run it from a windows app and not a web app then
    it is most likely a permission or file path issue.

    --
    Hope this helps,
    Bryant Hankins
    Numinet Systems Inc.
    http://www.numinet.com



    "sonyram" <> wrote in message
    news:...
    > As our application design requires us to use one of the validation API

    engine
    > which was written on C(so basically all I have is a dll) and I tested

    calling
    > the functions using small windows application using DllImport for each
    > functions and it works without any problem. But when I try to use the same
    > Dll in my asp.net web application, it hangs with the first call. I tried
    > giving the dll path as a hardcoded path like C:\validation.dll in my
    > dllimport funciton call but did not help.
    >
    > I am wondering it has something to do with ASPNET account security. So I
    > gave full control for ASPNET account for my application directory and

    still
    > my application hangs.
    >
    > Anybody faced this earlier?
    >
    Bryant Hankins, Aug 9, 2004
    #2
    1. Advertising

  3. Thanks Bryant for your reply. Actually I solved the problem. The reason is
    not security which I come to know after series of trying(like giving the
    aspnet account more privs). The reason is the first init call requires a
    filename parameter and I just gave only the filename and as it is an aspnet
    application, it tries to find that file system32 directory where it could not
    locate and it was waiting there. Once I hardcoded the value to local bin
    directory, it started working

    "Bryant Hankins" wrote:

    > You might try running FileMon from http://www.sysinternals.com and
    > use it to monitor all file access activities on your machine. It should give
    > you an idea of what's going on with your DLL. My guess is that you are on
    > the right track. If you can run it from a windows app and not a web app then
    > it is most likely a permission or file path issue.
    >
    > --
    > Hope this helps,
    > Bryant Hankins
    > Numinet Systems Inc.
    > http://www.numinet.com
    >
    >
    >
    > "sonyram" <> wrote in message
    > news:...
    > > As our application design requires us to use one of the validation API

    > engine
    > > which was written on C(so basically all I have is a dll) and I tested

    > calling
    > > the functions using small windows application using DllImport for each
    > > functions and it works without any problem. But when I try to use the same
    > > Dll in my asp.net web application, it hangs with the first call. I tried
    > > giving the dll path as a hardcoded path like C:\validation.dll in my
    > > dllimport funciton call but did not help.
    > >
    > > I am wondering it has something to do with ASPNET account security. So I
    > > gave full control for ASPNET account for my application directory and

    > still
    > > my application hangs.
    > >
    > > Anybody faced this earlier?
    > >

    >
    >
    >
    =?Utf-8?B?c29ueXJhbQ==?=, Aug 10, 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. Stephen Richardson

    DllImport and structures containing char[]

    Stephen Richardson, Aug 20, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,125
    Stephen Richardson
    Aug 20, 2003
  2. Michael Tissington

    DLLImport and Unable to Load DLL

    Michael Tissington, Sep 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    9,459
    Michael Tissington
    Sep 11, 2003
  3. Brian Anderson

    DllImport with ASP.NET ?

    Brian Anderson, Dec 25, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    9,992
    Brian Anderson
    Dec 26, 2004
  4. sonyram
    Replies:
    0
    Views:
    208
    sonyram
    Aug 9, 2004
  5. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    367
    Ville Mattila
    Jul 24, 2005
Loading...

Share This Page