 |
| ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 26th, 2003, 09:07 PM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Physcial and Virtual path in Intranet!
I've got this problem. Currently, i'm in an intranet where i have mapping to this folder amsweb02... All coding is done inside this folder, however i'm required to do a Search Engine to search through a local drive folder (K:\public) for pdf files... Coding shouldn't be a problem right now, what the error was, [u]" The Path Parameter for the MapPathmethod must be a virtual path, A physical path was used."</u> :(
I'm using WIN XP, i got no idea how to map... There is a total of 7000+ pdf files to search through, so i don't think i can copy and paste all these files into the amsweb02 folder! Please Help!!!!
i'm a beginner, hoping to learn more.. please help... thanks a lot
__________________
i\'m a beginner, hoping to learn more.. please help... thanks a lot
|
|

August 27th, 2003, 02:53 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
You can either set up a virtual directory under amsweb02 which points to k:\public, or you can do away with the MapPath part and just use the physical location directly.
|
|

August 27th, 2003, 03:47 AM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
you trying to say i can use physical path instead? how do i do that? not using filesystemboject right?
and how do i set up a virtual directory under amsweb02 which will be pointed to k:\public? is there special codings for this? or?
i'm a beginner, hoping to learn more.. please help... thanks a lot
|
|

August 27th, 2003, 04:21 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
FileSystemObject will happily take a physical path.
The easiest way to create a virtual directory is using the Internet Services Manager. Here's a microsoft article that explains how to do it for all version of IIS (since you have XP, you will have IIS 5.1)
http://support.microsoft.com/default...172138&sd=tech
|
|

August 27th, 2003, 07:39 PM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
filesystemobject doesn't work.. it gives me this error of using physical path instead of virtual path.. that's why i don't think it works... as work IIS, i'm already in an intranet amsweb02, can i map to another folder when i already have one mapping of the amsweb02 done by the intranet?
i'm a beginner, hoping to learn more.. please help... thanks a lot
|
|

August 28th, 2003, 03:02 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Which methods of FileSystemObject are you using? can you post some code?
Re the virtual directory - I meant that you could create a virtual dir under the root dir so you would have:
amsweb02 - same as you have now
amsweb02/pdf - points to k:\public
then you could use filesystemobject.someMethod( Server.MapPath("pdf") )
|
|

August 31st, 2003, 08:26 PM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
<%
Const fsoForReading = 1
Dim strSearchText
strSearchText = Request.Form("SearchText")
'Now, we want to search all of the files
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder(Server.MapPath("/dept/quality/test/"))
'Declare the variables used to compare the
'textstring with the details of files in the folder
Dim objFile, objTextStream, strFileContents, bolFileFound
bolFileFound = False
'Searching through each different files' name
For Each objFile in objFolder.Files
If Response.IsClientConnected then
strFileContents = objFile.Name
'Comparing file name with the textstring
If InStr(1,strFileContents,strSearchText,1) then
Response.Write "<LI><A HREF=""http://amsweb02/dept/quality/test/" & objFile.Name & _
""">" & objFile.Name & "</A><BR>"
bolFileFound = True
End If
End If
Next
if Not bolFileFound then Response.Write "No matches found...<br>Tip: Check your P/N or component number again carefully!"
Set objTextStream = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
i'm a beginner, hoping to learn more.. please help... thanks a lot
|
|
 |