FileSystemObject On IIS

M

MDW

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.
 
S

Steven Burn

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!
 
M

MDW

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.
 
M

MDW

Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

Steven Burn said:
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 said:
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.
 
S

Steven Burn

Try enabling the error messages if you haven't already;

In IE;

Tools > Internet Options > Advanced (tab)

Untick "Show friendly HTTP error messages"

In IIS;

Home Directory (tab) > Configuration (button)

Click the Debugging tab, then place a tick in "Enable ASP server-side ascript debugging"

Under "Script Error Messages", select "Send detailed ASP error messages to client"

--
Regards

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

Keeping it FREE!

MDW said:
Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

Steven Burn said:
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 said:
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.

:

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!

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.
 
M

MDW

Well, I might have misspoken. It's been about 25 minutes, and I STILL can't
get the page to load, even to come up with an error. The progress bar is
about halfway, and it doesn't look like it's moving any farther.

Steven Burn said:
Try enabling the error messages if you haven't already;

In IE;

Tools > Internet Options > Advanced (tab)

Untick "Show friendly HTTP error messages"

In IIS;

Home Directory (tab) > Configuration (button)

Click the Debugging tab, then place a tick in "Enable ASP server-side ascript debugging"

Under "Script Error Messages", select "Send detailed ASP error messages to client"

--
Regards

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

Keeping it FREE!

MDW said:
Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

Steven Burn said:
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!

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.

:

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!

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.
 
S

Steven Burn

Bit of a long shot but, try checking the permissions for the folder your trying to access, and make sure you don't have any third party applications that could be blocking the script (e.g. Norton, Zone Alarm, WinPatrol, Spybot S&D, ScriptSentry etc etc etc)

--
Regards

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

Keeping it FREE!

MDW said:
Well, I might have misspoken. It's been about 25 minutes, and I STILL can't
get the page to load, even to come up with an error. The progress bar is
about halfway, and it doesn't look like it's moving any farther.

Steven Burn said:
Try enabling the error messages if you haven't already;

In IE;

Tools > Internet Options > Advanced (tab)

Untick "Show friendly HTTP error messages"

In IIS;

Home Directory (tab) > Configuration (button)

Click the Debugging tab, then place a tick in "Enable ASP server-side ascript debugging"

Under "Script Error Messages", select "Send detailed ASP error messages to client"

--
Regards

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

Keeping it FREE!

MDW said:
Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

:

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!

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.

:

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!

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.
 
K

Kyle Peterson

norton script blocking ?

its evil for asp

MDW said:
Well, I might have misspoken. It's been about 25 minutes, and I STILL
can't
get the page to load, even to come up with an error. The progress bar is
about halfway, and it doesn't look like it's moving any farther.

Steven Burn said:
Try enabling the error messages if you haven't already;

In IE;

Tools > Internet Options > Advanced (tab)

Untick "Show friendly HTTP error messages"

In IIS;

Home Directory (tab) > Configuration (button)

Click the Debugging tab, then place a tick in "Enable ASP server-side
ascript debugging"

Under "Script Error Messages", select "Send detailed ASP error messages
to client"

--
Regards

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

Keeping it FREE!

MDW said:
Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

:

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!

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.

:

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!

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.
 
S

Steven Burn

Just an FYI, been sorting out my favourites and came accross this;

#2180 Why does FileSystemObject hang all of a sudden
http://www.aspfaq.com/show.asp?id=2180

ASPFAQ seems to be down atm (well, I can't get the page up atm here anyway) so if you have any problems, try viewing it later :eek:)

--
Regards

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

Keeping it FREE!

Bit of a long shot but, try checking the permissions for the folder your trying to access, and make sure you don't have any third party applications that could be blocking the script (e.g. Norton, Zone Alarm, WinPatrol, Spybot S&D, ScriptSentry etc etc etc)

--
Regards

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

Keeping it FREE!

MDW said:
Well, I might have misspoken. It's been about 25 minutes, and I STILL can't
get the page to load, even to come up with an error. The progress bar is
about halfway, and it doesn't look like it's moving any farther.

Steven Burn said:
Try enabling the error messages if you haven't already;

In IE;

Tools > Internet Options > Advanced (tab)

Untick "Show friendly HTTP error messages"

In IIS;

Home Directory (tab) > Configuration (button)

Click the Debugging tab, then place a tick in "Enable ASP server-side ascript debugging"

Under "Script Error Messages", select "Send detailed ASP error messages to client"

--
Regards

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

Keeping it FREE!

MDW said:
Well, OK so I need to use GetFOlder. But it still doesn't seem to work.

Any ideas if I need to change any IIS settings to get it to work right?

:

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!

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.

:

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!

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top