IIS6& ASP:使用FSO访问网络文件失败 [英] IIS6 & ASP: accessing network files with FSO fails

查看:66
本文介绍了IIS6& ASP:使用FSO访问网络文件失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在花了无数个小时尝试之后,我放弃并希望得到一些帮助

在这里。


在server1上我得到了网络myweb.com用我的test.asp。在test.asp中,我是

尝试使用FSO从UNC路径读取文件:

设置myFile =

的Server.CreateObject(QUOT; Scripting.FileSystemObject的")。 GetFile(" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\这笔交易:

- server1& server2是域的成员

- iis6与asp(不是.net)一起使用

- myweb.com在域用户的上下文中运行(我的管理员帐户甚至,对于

测试目的)

- unc共享拥有对每个人的完全权利

- server2上的文件权限设置为完全权限每个人

- 我可以在test.vbs

中使用相同的代码*成功读取文件* - 如果我使用&b设置虚拟文件夹到unc路径连接为在

iis6中,我可以使用我的webbrowser浏览远程文件 - 但是asp代码

仍然失败。


这个让我发疯我找到的所有howtos,帖子和页面告诉我运行

网站作为域用户拥有足够的权利 - 这就是我正在做的事情,

但是它只是不工作!


非常感谢任何帮助!

- 托马斯

解决方案

On Mon,2005年3月21日04:18:23 +0100,Thomas < me@alternize.com>写道:

花了无数个小时尝试后,我放弃了,希望能在这里得到一些帮助。

在server1上我得到了网页myweb.com和我的test.asp。在test.asp中,我试图用FSO从UNC路径读取文件:
设置myFile =
Server.CreateObject(Scripting.FileSystemObject)。 GetFile(\\\\\\\\\\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ server1& server2是域的成员
- iis6与asp(不是.net)一起使用
- myweb.com在域用户的上下文中运行(我的管理员帐户甚至用于
测试目的) )
- unc共享对每个人都拥有完全的权利
- server2上的文件权限被设置为对每个人的完全权限
- 我可以使用相同的代码*成功读取文件* test.vbs
- 如果我使用connect as设置虚拟文件夹到unc路径在iis6中,我可以使用我的webbrowser浏览远程文件 - 但是asp代码
仍然失败。

这让我发疯了。我找到的所有howtos,帖子和页面都告诉我作为一个拥有足够权利的域用户运行网页 - 这就是我正在做的事情,
但它只是不起作用!




你发布了很多详细信息,但你遗漏了最重要的一个 -

正是失败的确切含义并且不会工作是什么意思?


Jeff


基本上,ASP中包含FSO访问远程UNC的所有内容

路径失败 - 读取文件夹,文件并写入它们失败。甚至一个

FileExists检查失败:

oFSO.FileExists(" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -

虽然我可以直接访问该文件(即不使用oFSO)。


i不认为我的代码有问题,因为它对本地工作完全有效

文件 - 即使我通过他们当地的UNC路径访问它们(即

" \\\\\\\

\ justatest.txt")


所以:任何尝试通过ASP中的unc />
路径读取/写入/访问远程文件的函数都会导致许可被拒绝或者找不到文件

运行时错误。


- 托马斯


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!


after spending countless hours trying, i give up and hope to get some help
in here.

on server1 i got the web myweb.com with my test.asp. in the test.asp, i''m
trying to read a file from an UNC path with a FSO:
Set myFile =
Server.CreateObject("Scripting.FileSystemObject"). GetFile("\\server2\myshare\myfile.txt")
this fails with an Permission Denied.

here''s the deal:
- server1 & server2 are members of a domain
- iis6 is used with asp (not .net)
- myweb.com runs in the context of a domain user (my admin account even, for
testing purposes)
- the unc share has full rights to Everyone
- the file permissions on server2 are set to full rights to Everyone
- i can successfully read the file *with the same code* in a test.vbs
- if i set up a virtual folder to the unc path using "connect as" within the
iis6, i can browse the remote files with my webbrowser - but the asp code
still fails.

this is driving me crazy. all howtos, posts and pages i found tell me to run
the web as a domain user with sufficient rights -- this is what i''m doing,
but it just won''t work!

any help is greatly appreciated!
- thomas

解决方案

On Mon, 21 Mar 2005 04:18:23 +0100, "Thomas" <me@alternize.com> wrote:

after spending countless hours trying, i give up and hope to get some help
in here.

on server1 i got the web myweb.com with my test.asp. in the test.asp, i''m
trying to read a file from an UNC path with a FSO:
Set myFile =
Server.CreateObject("Scripting.FileSystemObject") .GetFile("\\server2\myshare\myfile.txt")
this fails with an Permission Denied.

here''s the deal:
- server1 & server2 are members of a domain
- iis6 is used with asp (not .net)
- myweb.com runs in the context of a domain user (my admin account even, for
testing purposes)
- the unc share has full rights to Everyone
- the file permissions on server2 are set to full rights to Everyone
- i can successfully read the file *with the same code* in a test.vbs
- if i set up a virtual folder to the unc path using "connect as" within the
iis6, i can browse the remote files with my webbrowser - but the asp code
still fails.

this is driving me crazy. all howtos, posts and pages i found tell me to run
the web as a domain user with sufficient rights -- this is what i''m doing,
but it just won''t work!



You post lots of details, but you left out the most important one --
Just exactly what does "fails" and "won''t work" mean?

Jeff


basically, everything in ASP that incorporates FSO accessing remote UNC
paths fails - reading folders, files and writing to them fails. even a
FileExists check fails:

oFSO.FileExists("\\server2\myshare\myfile.txt") returns always false -
eventhough i can access the file directly (i.e. not using oFSO).

i dont think its a problem with my code, as it works perfeclty for local
files - even when i access them through their local UNC path (i.e.
"\\server1\d


\justatest.txt")

so: any function trying to read/write/access remote files through an unc
path within ASP results in a "permission denied" or "file not found"
runtime error.

- thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于IIS6&amp; ASP:使用FSO访问网络文件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆