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

  • Thread starter Thread starter quintesv via DotNetMonster.com
  • Start date Start date
Q

quintesv via DotNetMonster.com

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
 
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
 
Back
Top