Accessing a network resource/file fails thru asp.net and interop dll

Discussion in 'ASP .Net' started by quintesv via DotNetMonster.com, Oct 24, 2006.

  1. Hi all,

    I have written a class to set the current principal identity of a asp.net 1.1
    vs 2003 project to a domain user by means of LOGONUSER, which effectively
    lets me access files on another computer, due to the fact that the asp.net
    pages run under the ASPnet account. This basically means that the process is
    running under my domain/user account.

    Accessing a file \\server\folder\file.txt via this method and then calling
    Context.undo works 100%! Awesome.

    But I have to access files via unc through a delphi dll which then connects
    to FoxPro files. So effectively what is happening is that I am calling

    //begin code
    DelphiComponent.class obj = new DelphiComponent.class().

    obj.Connect(szPathToData)
    //end code.

    problem is the DLL is not able to see the folder, so I'm assuming that an out
    of process call is being made, which is defaulting to run under the
    machine/aspnet account so its not able to access the network resource.

    I must use the DLL, its not negotiable...

    Any ideas on how I can tackle this?
    Thanks in advance
    Q
     
    quintesv via DotNetMonster.com, Oct 24, 2006
    #1
    1. Advertisements

  2. quintesv via DotNetMonster.com

    xAvailx Guest

    I don't know much about Delphi but....

    You may be able to wrap the dll into a COM + application. You can then
    run the component using a different identity. It is a long shot, but it
    may be worth a try...

    HTH
     
    xAvailx, Oct 24, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.