Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM object unable to detect FileExists?

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
ello all,

We have a component (DLL) we created for use with our Web App. The object is supposed to check if a file exists on another server (i.e. \\server_name\folder\file.tif ), and if it does, pull it into a list of files that will be displayed to be worked with by the user.

We have one file server, and it has no security on it...anyone (or any computer) internally can access it freely. When we call the Component on our Dev server, it pulls the list of files as it should. When we call the same component on the Test server, it no longer displays the list of files. Now, here's the kicker: If we're actually ON the Test server and test it, it will list the files from that file server (separate from the Dev or Test servers); it is only when you're running the web app while not on the Test box that it doesn't work (which is what will be occurring 100% of the time in Production).

I know the component is being called successfully on the Test machine, and is running, because if the FileExists check fails I have it write an error in a log file (text document), which is being generated. It continually fails to see the folders/files on the other server unless we're logged onto the Test box, then it sees it fine. But it works normally if run from the Dev machine, even if the web app calls it from another computer other than the Dev server. But all servers/computers/users have free-reign on the File server, so it's not like it is a permissions setting to access the file server or to run the component (since we know it is running).

Does anyone know what could be causing this? And how to fix it?


-Ovatvvon :-Q
 
It is probably a case of the ASP running under the security context of a domain account on the dev server but under a local IUSR_ account on the test server.
 

Actually, we don't allow anonymous users on the intranet (what this is dealing with); it is all controlled through "integrated network security" based on login. But the COM is run through a specified network account set aside just for it.

-Ovatvvon :-Q
 
Your object is inside a COM+ component services package?
 
Ovatvvon, it still sounds like a permissions issue from the web server to the remote server.
Here is another possible test for you.

Modify your ASP code to run as a .vbs file so you can run it directly from the desktop. The code will execute under the security of the current logon ID, the DLL will attempt doing the file exists test on the remote server.
If it works then you know it is working cross-server and that is not the issue. That would say to me that the issue is with the web servers permissions to the file folder on the remote server.

I do not know much about COM objects and if they represent different permission issues but consider this.
Even if your file server is set to allow everyone access to the files it still requires a method of authentication. Users coming across the network directly are already setup to authenticate with the same methods the file server uses but the IIS server is different. First the IIS servers IWAM or IUSR account is probably not a domain account which is going to be the first big difference from other users logon accounts. Second the default authentication methods of the IIS server differ from the file server and the IIS server wants to control the passing of the ID/Password info.

Take a look at this MS article on problems with FileSystemObject on remote files, I believe the solution will be the same or similar for your problem.


Paranoid? ME?? Who wants to know????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top