Welcome to WebmasterWorld Guest from 54.196.244.186

Forum Moderators: ocean10000

Message Too Old, No Replies

File System Object Issue

Same code two scripts - one works one doesn't

     
1:41 am on Aug 7, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts: 4392
votes: 0


I'm using a COM object to upload a file from the web page.
I've been using a routine for years, it works perfectly.

three steps:
save the file to a directory
copy the file to another directory
move the original file to a mapped drive on another server.

No issues.

I created a new page using the same code. Copy/Pasted.
The third step fails! Every time. I'm baffled.

Language is Javascript, variables are good.

Here is the line:
fs.MoveFile("E:\\Dir\\SubDir\\SubSubDir\\" + fullName, "\\\\Wnn308\\OtherDir\\" + fullName);

error '8007052e'
5:08 am on Aug 7, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:852
votes: 0


The most common problem is a permission issue. And depending on version of IIS and how it is configured will effect which user account it uses to access network shares.
2:00 pm on Aug 7, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


Thanks O. I can't see any issue with permissions. Both files are configured the same way, and both files MoveFile to the same directory.

But that give me another lead to investigate in the IIS.
3:24 pm on Aug 7, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:852
votes: 0


Just to double check what user account IIS is using to connect to the fileshare run Process Monitor by sysinternals.com on the server hosting the UNC share and open the webpage that access the share.

Cannot access remote files with the FileSystemObject [support.microsoft.com]
Process Monitor [technet.microsoft.com] which replaces filemon
3:26 pm on Aug 7, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


BINGO! It was a file-level permission on the file that has the MoveFile code.

It was set to IUSR in the IIS, but needed to be an administrator on the server.