473,545 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IIS 5.0 Error path not fond

Hello All!
I found function for enumerate files in special folder and pasted in my asp
page, but Server generate error.
Who could tell me why server IIS 5.0 generate error, and how I must input
path for http://host/pdf?
<%
function ShowFolderFileL ist(folderspec)
{
var fso, f, f1, fc, s;
fso = new ActiveXObject(" Scripting.FileS ystemObject");
f = fso.GetFolder(f olderspec);
fc = new Enumerator(f.fi les);
s = ""; for (; !fc.atEnd(); fc.moveNext())
{
s += fc.item();
s += "";
}
return(s);
}
var str;
str = ShowFolderFileL ist('http://localhost/pdf'); or str =
ShowFolderFileL ist('/pdf');
^^^^^^^^^^^^^^^ error at this string Path not found

Response.Write( str);
%>
Thanks.
Stas.
Jul 19 '05 #1
2 1965
You need to give it the local path to the file, not the url. Look in the
help files for Server.MapPath that returns a string showing the actual
physical path of a file within the website.
I believe you'd do:
str = ShowFolderFileL ist(mapPath('/pdf'))

Lance

"Stas" <st******@mail. ru> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
Hello All!
I found function for enumerate files in special folder and pasted in my asp page, but Server generate error.
Who could tell me why server IIS 5.0 generate error, and how I must input
path for http://host/pdf?
<%
function ShowFolderFileL ist(folderspec)
{
var fso, f, f1, fc, s;
fso = new ActiveXObject(" Scripting.FileS ystemObject");
f = fso.GetFolder(f olderspec);
fc = new Enumerator(f.fi les);
s = ""; for (; !fc.atEnd(); fc.moveNext())
{
s += fc.item();
s += "";
}
return(s);
}
var str;
str = ShowFolderFileL ist('http://localhost/pdf'); or str =
ShowFolderFileL ist('/pdf');
^^^^^^^^^^^^^^^ error at this string Path not found

Response.Write( str);
%>
Thanks.
Stas.

Jul 19 '05 #2
I answered this in another group. Please don't multi-post.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Stas" <st******@mail. ru> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
Hello All!
I found function for enumerate files in special folder and pasted in my asp page, but Server generate error.
Who could tell me why server IIS 5.0 generate error, and how I must input
path for http://host/pdf?
<%
function ShowFolderFileL ist(folderspec)
{
var fso, f, f1, fc, s;
fso = new ActiveXObject(" Scripting.FileS ystemObject");
f = fso.GetFolder(f olderspec);
fc = new Enumerator(f.fi les);
s = ""; for (; !fc.atEnd(); fc.moveNext())
{
s += fc.item();
s += "";
}
return(s);
}
var str;
str = ShowFolderFileL ist('http://localhost/pdf'); or str =
ShowFolderFileL ist('/pdf');
^^^^^^^^^^^^^^^ error at this string Path not found

Response.Write( str);
%>
Thanks.
Stas.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3536
by: Xeon | last post by:
Hi, Is there anyway to set a custom error handler which is actually a method of a class? i.e. setting the method eh() of class foo as error handler in the snippet below. class foo { function eh() { do something } }
9
3119
by: Rennie deGraaf | last post by:
If a C++ I/O operation fails, then how can I determine the cause? For instance, in C, I'd do something like this: FILE* file; file = fopen("foo.txt", "r"); if (file == NULL) { switch(errno) ... }
52
2244
by: Darklight | last post by:
Question: Write a function named sumarrays() that accepts two arrays that are the same size. The function should add each element in the array together and place the values in the thrid array. Which answer is the better practice; /*EX9.C*/ #include<stdio.h> #define MAX 5
15
5311
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
8
1951
by: mohit | last post by:
Hi, I am creating a web application in Web Matrix on the .NET framework. I have two directories :AddUser and FormAuth in a Directory P. AddUser contains a file AddUser.aspx FormAuth contains : Default.aspx , Users.xml , Login.aspx I have the following code :
4
3183
by: Jerry West | last post by:
I am new to VB .NET moving from VB6. I wrote the following code and as a result I received an error concerning it from the IDE. I don't understand why I get the message or why that what I am doing is not legal. Here is the code: Public Function mP_IsPathExist(ByVal Path As String) As Boolean On Error Resume Next Dim myIO As New...
0
2012
by: poojamangal | last post by:
I want to upload images or pdf files. but i m unable to do so. i got error. please help me to sort it out.. my code is: <% 'on error resume next Class FreeASPUpload Public UploadedFiles Public FormElements Private VarArrayBinRequest
2
6344
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/ install/ --with-__thread --enable-kernel=2.6.11 --enable-shared
10
6934
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114....
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.