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