IIS上的FileSystemObject [英] FileSystemObject On IIS

查看:40
本文介绍了IIS上的FileSystemObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是编码问题还是IIS设置问题。


我在本地计算机上启用了IIS(Windows XP SP2)所以我在将我的网页推广到主机服务之前可以做一些ASP

开发,比如

Brinkster。我之前从未这样做过。


我也在尝试使用FileSystemObject为所有HTML创建动态的链接集

文件夹中的文件,因此我不必继续添加

并删除链接,因为我的主要内容发生了变化。我以前从未在网站

网站上使用FSO。


每当执行以下代码时,页面都不会加载:


设置objFSO = Server.CreateObject(" Scripting.FileSystemObject")

strPath = Server.MapPath(Request.ServerVariables(" PATH_INFO"))

strPath = Left(strPath,InStrRev(strPath," \"))


Response.Write strPath& "< br>"


设置objFolder = objFSO.OpenFolder(strPath)


Response.Write strPath& "已经打开了


设置objFolder =没什么

设置objFSO =没什么


我很确定它是objFSO.OpenFolder命令'导致页面

死亡 - 当我评论它时,页面加载正常。我很确定

代码没问题,但我不是肯定的。当我在ASP中使用FSO时,有什么我必须做的不同

吗?


或者我可能没有正确配置我的IIS ?那个

指针呢?我对服务器设置一无所知。

-

嗯......他们现在在计算机上上网了!

I''m not sure if this is a coding problem or an IIS settings problem.

I''ve enabled IIS on my local machine (Windows XP SP2) so I can do some ASP
development prior to rolling out my Web page to a hosting service like
Brinkster. I''ve never done that before.

I''m also trying to use the FileSystemObject to create a dynamic set of links
to all the HTML files within a folder, so that I don''t have to keep adding
and removing links as my main content changes. I''ve never used FSO on a Web
site before.

Whenever the following code executes, the page doesn''t load:

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables("PATH_INFO" ))

strPath = Left(strPath, InStrRev(strPath,"\"))

Response.Write strPath & "<br>"

Set objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath & " has been opened"

Set objFolder = Nothing
Set objFSO = Nothing

I''m pretty sure it''s the "objFSO.OpenFolder" command that''s causing the page
to die - when I comment it out, the page loads fine. I''m fairly certain the
code is OK, but I''m not positive. Is there something I have to do differently
when I use FSO within ASP?

Or is it possible that I don''t have my IIS configured correctly? Any
pointers on that? I know absolutely nothing about server setup.
--
Hmm...they have the Internet on COMPUTERS now!

推荐答案

我不知道FSO有OpenFolder方法吗?


尝试更改;


设置objFolder = objFSO.OpenFolder(strPath)


To;


设置objFolder = objFSO.GetFolder(strPath)


-

问候


Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!


" MDW" < MD*@discussions.microsoft.com>在消息新闻中写道:82 ********************************** @ microsof t.com ...
I wasn''t aware there was an OpenFolder method for FSO?

Try changing;

Set objFolder = objFSO.OpenFolder(strPath)

To;

Set objFolder = objFSO.GetFolder(strPath)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com...
我不确定这是编码问题还是IIS设置问题。

我已经在我的本地计算机上启用了IIS(Windows XP SP2),因此在将我的网页推广到主机服务之前我可以进行一些ASP
开发。 Brinkster。我之前从未这样做过。

我也在尝试使用FileSystemObject为文件夹中的所有HTML文件创建一组动态链接,以便我当我的主要内容发生变化时,不必继续添加
并删除链接。我以前从未在网站上使用过FSO。

每当下面的代码执行时,页面都没有加载:

设置objFSO = Server.CreateObject(" Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables(" PATH_INFO"))

strPath = Left(strPath,InStrRev(strPath,") ; \"))

Response.Write strPath& "< br>"

设置objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath& "已打开

设置objFolder = Nothing
设置objFSO = Nothing

我很确定它是objFSO.OpenFolder命令导致页面死亡 - 当我评论它时,页面加载正常。我很确定
代码没问题,但我不是正面的。当我在ASP中使用FSO时,有什么我必须做的不同吗?

或者我可能没有正确配置IIS?关于那个的任何指示?我对服务器设置一无所知。
-
嗯......他们现在在计算机上有互联网!
I''m not sure if this is a coding problem or an IIS settings problem.

I''ve enabled IIS on my local machine (Windows XP SP2) so I can do some ASP
development prior to rolling out my Web page to a hosting service like
Brinkster. I''ve never done that before.

I''m also trying to use the FileSystemObject to create a dynamic set of links
to all the HTML files within a folder, so that I don''t have to keep adding
and removing links as my main content changes. I''ve never used FSO on a Web
site before.

Whenever the following code executes, the page doesn''t load:

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables("PATH_INFO" ))

strPath = Left(strPath, InStrRev(strPath,"\"))

Response.Write strPath & "<br>"

Set objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath & " has been opened"

Set objFolder = Nothing
Set objFSO = Nothing

I''m pretty sure it''s the "objFSO.OpenFolder" command that''s causing the page
to die - when I comment it out, the page loads fine. I''m fairly certain the
code is OK, but I''m not positive. Is there something I have to do differently
when I use FSO within ASP?

Or is it possible that I don''t have my IIS configured correctly? Any
pointers on that? I know absolutely nothing about server setup.
--
Hmm...they have the Internet on COMPUTERS now!






我相信这两种语法是有效的。


但无论如何,改变方法并没有帮助。它只是坐在那里

试图加载。如果我让它坐在那里足够长的时间,我会得到一个此页面

无法显示错误。


" Steven Burn"写道:
I believe that both syntaxes are valid.

But in either case, changing the method didn''t help. It just sits there and
tries to load. If I let it sit there long enough, I''ll get a "This page
cannot be displayed" error.

"Steven Burn" wrote:
我不知道有FSO的OpenFolder方法吗?

尝试改变;

设置objFolder = objFSO.OpenFolder(strPath)

To;

设置objFolder = objFSO.GetFolder(strPath)

-
关心

Steven Burn
你的IT Mate Group
www.it-mate.co.uk

保持免费!

MDW < MD*@discussions.microsoft.com>在消息新闻中写道:82 ********************************** @ microsof t.com ...
I wasn''t aware there was an OpenFolder method for FSO?

Try changing;

Set objFolder = objFSO.OpenFolder(strPath)

To;

Set objFolder = objFSO.GetFolder(strPath)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com...
我不确定这是编码问题还是IIS设置问题。

我在本地计算机上启用了IIS(Windows XP SP2),所以我可以在将我的网页推广到像Brinkster这样的托管服务之前,先进行一些ASP开发。我之前从未这样做过。

我也在尝试使用FileSystemObject为文件夹中的所有HTML文件创建一组动态链接,以便我当我的主要内容发生变化时,不必继续添加
并删除链接。我以前从未在网站上使用过FSO。

每当下面的代码执行时,页面都没有加载:

设置objFSO = Server.CreateObject(" Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables(" PATH_INFO"))

strPath = Left(strPath,InStrRev(strPath,") ; \"))

Response.Write strPath& "< br>"

设置objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath& "已打开

设置objFolder = Nothing
设置objFSO = Nothing

我很确定它是objFSO.OpenFolder命令导致页面死亡 - 当我评论它时,页面加载正常。我很确定
代码没问题,但我不是正面的。当我在ASP中使用FSO时,有什么我必须做的事情吗?

或者我可能没有正确配置我的IIS?关于那个的任何指示?我对服务器设置一无所知。
- 嗯......现在他们在计算机上有互联网了!
I''m not sure if this is a coding problem or an IIS settings problem.

I''ve enabled IIS on my local machine (Windows XP SP2) so I can do some ASP
development prior to rolling out my Web page to a hosting service like
Brinkster. I''ve never done that before.

I''m also trying to use the FileSystemObject to create a dynamic set of links
to all the HTML files within a folder, so that I don''t have to keep adding
and removing links as my main content changes. I''ve never used FSO on a Web
site before.

Whenever the following code executes, the page doesn''t load:

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables("PATH_INFO" ))

strPath = Left(strPath, InStrRev(strPath,"\"))

Response.Write strPath & "<br>"

Set objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath & " has been opened"

Set objFolder = Nothing
Set objFSO = Nothing

I''m pretty sure it''s the "objFSO.OpenFolder" command that''s causing the page
to die - when I comment it out, the page loads fine. I''m fairly certain the
code is OK, but I''m not positive. Is there something I have to do differently
when I use FSO within ASP?

Or is it possible that I don''t have my IIS configured correctly? Any
pointers on that? I know absolutely nothing about server setup.
--
Hmm...they have the Internet on COMPUTERS now!




我得到OpenFolder;


Microsoft VBScript运行时错误''800a01b6''

对象不支持此属性或方法:''OpenFolder''


GetFolder我得到了;


[路径删除] \ misc \

[路径删除] \ misc \已经打开

http://mysteryfcm.plus.com/misc/testfso.asp

我使用过的代码:

http://mysteryfcm.plus.com/misc/testfso.asp? s = Show_Code


-

问候

Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!


" MDW" < MD*@discussions.microsoft.com>在消息新闻中写道:EE ********************************** @ microsof t.com ...
With OpenFolder I got;

Microsoft VBScript runtime error ''800a01b6''
Object doesn''t support this property or method: ''OpenFolder''

With GetFolder I got;

[Path Removed]\misc\
[Path Removed]\misc\ has been opened

http://mysteryfcm.plus.com/misc/testfso.asp

Code I used:

http://mysteryfcm.plus.com/misc/testfso.asp?s=Show_Code

--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:EE**********************************@microsof t.com...
我相信这两种语法都是有效的。

但无论如何,改变方法并没有帮助。它只是坐在那里并试图加载。如果我让它坐在那里足够长的时间,我会得到一个此页面
无法显示错误。

史蒂文伯恩写道:
I believe that both syntaxes are valid.

But in either case, changing the method didn''t help. It just sits there and
tries to load. If I let it sit there long enough, I''ll get a "This page
cannot be displayed" error.

"Steven Burn" wrote:
我不知道有FSO的OpenFolder方法吗?

尝试改变;

设置objFolder = objFSO.OpenFolder(strPath)

To;

设置objFolder = objFSO.GetFolder(strPath)

-
关心

Steven Burn
你的IT Mate Group
www.it-mate.co.uk

保持免费!

MDW < MD*@discussions.microsoft.com>在消息新闻中写道:82 ********************************** @ microsof t.com ...
I wasn''t aware there was an OpenFolder method for FSO?

Try changing;

Set objFolder = objFSO.OpenFolder(strPath)

To;

Set objFolder = objFSO.GetFolder(strPath)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com...
我不确定这是编码问题还是IIS设置问题。

我已经在我的本地计算机上启用了IIS(Windows XP SP2),因此在将我的网页推广到主机服务之前我可以进行一些ASP
开发。 Brinkster。我之前从未这样做过。

我也在尝试使用FileSystemObject为文件夹中的所有HTML文件创建一组动态链接,以便我当我的主要内容发生变化时,不必继续添加
并删除链接。我以前从未在网站上使用过FSO。

每当下面的代码执行时,页面都没有加载:

设置objFSO = Server.CreateObject(" Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables(" PATH_INFO"))

strPath = Left(strPath,InStrRev(strPath,") ; \"))

Response.Write strPath& "< br>"

设置objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath& "已打开

设置objFolder = Nothing
设置objFSO = Nothing

我很确定它是objFSO.OpenFolder命令导致页面死亡 - 当我评论它时,页面加载正常。我很确定
代码没问题,但我不是正面的。当我在ASP中使用FSO时,有什么我必须做的不同吗?

或者我可能没有正确配置IIS?关于那个的任何指示?我对服务器设置一无所知。
-
嗯......他们现在在计算机上有互联网!
I''m not sure if this is a coding problem or an IIS settings problem.

I''ve enabled IIS on my local machine (Windows XP SP2) so I can do some ASP
development prior to rolling out my Web page to a hosting service like
Brinkster. I''ve never done that before.

I''m also trying to use the FileSystemObject to create a dynamic set of links
to all the HTML files within a folder, so that I don''t have to keep adding
and removing links as my main content changes. I''ve never used FSO on a Web
site before.

Whenever the following code executes, the page doesn''t load:

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath(Request.ServerVariables("PATH_INFO" ))

strPath = Left(strPath, InStrRev(strPath,"\"))

Response.Write strPath & "<br>"

Set objFolder = objFSO.OpenFolder(strPath)

Response.Write strPath & " has been opened"

Set objFolder = Nothing
Set objFSO = Nothing

I''m pretty sure it''s the "objFSO.OpenFolder" command that''s causing the page
to die - when I comment it out, the page loads fine. I''m fairly certain the
code is OK, but I''m not positive. Is there something I have to do differently
when I use FSO within ASP?

Or is it possible that I don''t have my IIS configured correctly? Any
pointers on that? I know absolutely nothing about server setup.
--
Hmm...they have the Internet on COMPUTERS now!







这篇关于IIS上的FileSystemObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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