Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript 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
  #1 (permalink)  
Old September 1st, 2003, 10:30 PM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default Server Drives and network folders...

Just to check with you all, is it possible for IIS to map a server drive to network folder? i wanted to try this, but will other users who are sharing these drives be able to view the results on their own desktops when browsing through the intranet provided by the server?

This intranet website i created consist of a simple search engine that i need to search through the server drive! i always get an error saying the drive is a physically mapped path instead of a virtually mapped path when i do previewing of my codes as a user to this server!

i am given rights to view the folder in this server drive, can i just use IIS to map this drive to the web folder on my computer? or do i have to do it on the server side? i got no idea and cant proceed for a week already...

If IIS is used on my computer to map the drive to the webfolder, will other users be able to search through the drive without mapping the drive to the web folder on their own computers?

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
Reply With Quote
  #2 (permalink)  
Old September 2nd, 2003, 03:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I think you're getting confused between virtual directory mappings and windows drive mappings.

Mapping a windows drive to the network folder will not help you because thses mappings are user specific and cannot be guaranteed to be the same for all users.

So you want to search a drive on the LAN for files and display links to the found files so your users can access those files right? Here's what to do:
1. set up a virtual directory in IIS which is mapped to the network folder. To do this you need to go into Internet Services Manager and locate your web folder in the tree. Right-click the web folder and choose New > Virtual Directory. In the dialog box that pops up you then enter an alias for it (e.g. lanfolder) - this is the name you will use in your Server.MapPath statements in asp. Click next and enter the path to the network folder - this should be a UNC path like \\server\folder\subfolder, not a windows path like x:\folder\subfolder. Then when you click next you will be asked to provide a user and password to access the directory - this is the step that will allow your asp access to the lan folder, and also allow your users to view the files. For the mo you can just put in your own user id, but for production you will need a dedicated network logon for this purpose. Once this is finished you should have a tree view showing Default Web Site > yourapp > lanfolder. Finally, make sure that lanfolder is a subfolder, not a sub-application (you can tell by the icon - it should be a folder with a small globe - if its not then right-click lanfolder, choose properties and then on the virtual directory path, click the Remove button next to the Application name box, then hit OK to close the dialog).
2. right, now you're ready to search this folder using asp. To get hold of the folder just use a line like this:
Set objFolder = objFSO.GetFolder(Server.MapPath("lanfolder"))
(this assumes that the asp page will be in yourapp folder, not any other subfolder you might have).
3. The final thing is to provide links to the found documents for the users.
Response.Write "<LI><A HREF=""lanfolder/" & objFile.Name & _
                      """>" & objFile.Name & "</A><BR>"
When the user clicks on that link it will open the document - the user does not have to have any special drive mappings to see the document.

hth
Phil
Reply With Quote
  #3 (permalink)  
Old September 3rd, 2003, 03:54 AM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default

Can i ask do i really have to use the IIS since the network folder is already patheD? what i mean is that this network folder already acts as a IIS?

I approached my IS department and they told me to do my stuffs of this intranet website in this network folder because it's already path for our asp.

So how? do i need IIS anymore?

and can i check with you, what is "this should be a UNC path like \\server\folder\subfolder, "

where can i get this server folder's name? server's name?

i'm a beginner, hoping to learn more.. please help... thanks a lot
Reply With Quote
  #4 (permalink)  
Old September 3rd, 2003, 04:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Look man its up to you if you don't want to use this method. I choose this method because its easy, secure, the intranet users don't need to have rights to the folder (your IIS setup handles all that), you don't need to move the files around, in fact you don't change anything at all from a network point of view. Other network users can still access these files outside of IIS using the drive mappings already set-up, providing they have the relevant permissions. The virtual directory is just an easy way for your ASP page and IIS to access the folder.

To answer your specific questions:
1. Yes of course you still need IIS. You can't run ASP without it.
2. UNC path: if you have a drive already mapped to this folder then Windows Explorer displays the server and share name in the folder view.
Reply With Quote
  #5 (permalink)  
Old September 4th, 2003, 02:23 AM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default

I'm not trying to offend you. I'm really sorry... So the final thing is that you're trying to say i can just do everything using IIS is it? If so i will have to request for IIS from myy department.

What exactly is UNC, i don't really understand what you mean! I'm sorry! Can explain once more?

i'm a beginner, hoping to learn more.. please help... thanks a lot
Reply With Quote
  #6 (permalink)  
Old September 4th, 2003, 02:44 AM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default

Ok, pgtips, i think i'm wrong. I just approached my IS people, they told me that i can't just do mapping over at the developer side. That is to say, i can't just use an IIS to map two servers together on my side. I need "codings" to communicate in between the two servers. Do you know how to exactly communicate with the two servers? I really desperate for help.. If you don't know, can i like know who can i ask?

I'll try my best..

One more question, got any idea what is universal convention name?

i'm a beginner, hoping to learn more.. please help... thanks a lot
Reply With Quote
  #7 (permalink)  
Old September 4th, 2003, 03:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Ok wenzation, look I'm sorry I was a bit short with you. I can see you're confused about the whole thing, I should be more patient. Sometimes these things are hard to communicate with just messages.

Let's see if we can sort out some of the confusion by starting with the basics of what you want to do. You tell me if I've got the wrong idea, OK? Here goes:
Your company has some files in a network folder and they want you to develop an ASP page that will run on the company intranet and allow users to search for files in this network folder and display links to any files matching the search. That's it right?

OK, lets try and clear up the confusion about IIS. There are two scenarios we have to deal with:
1. you need to develop and test these ASP pages
2. when you've got it all sorted you need to get your ASP on to the company intranet

Your ASP needs to be done in such a way that the code doesn't need to be changed to go from 1 to 2.

For 1. you will need to have IIS so that you can develop and test your ASP pages. IIS can be either on your own PC, or you will need access to a development web server that is already running IIS. Either way lets refer to this PC as DEV.

For 2. there will already be a webserver that hosts the live Intranet, and obviously this PC will already have IIS. Lets call this one LIVE.

I think some of the confusion has arisen because I am talking about DEV but your IS people are talking about LIVE. From your earlier comment "I approached my IS department and they told me to do my stuffs of this intranet website in this network folder because it's already path for our asp." it sounds like LIVE already has a virtual directory set up in IIS which is mapped to this network folder.

What you need to do is get DEV set up so that it mimics the folder structure of LIVE (well, not the whole folder structure just the bit that concerns these network files and the ASP pages that will search/display them). Maybe an example would help here. Let's say, just for the sake of example, that the network folder is mapped to the LIVE IIS as http://LIVE/subfolders/pages/lanfolder and your ASP pages when finished will go in http://LIVE/subfolders/pages. In this case DEV just needs a setup like this, but ignoring the subfolders bit, so you need http://DEV/pages and http://DEV/pages/lanfolder. To get this set up on DEV the stuff that I posted before about setting up a virtual directory is what you will need. This virtual directory is also the answer to your question "Do you know how to exactly communicate with the two servers?"

Finally UNC paths: UNC stands for Universal Naming Convention. Its a way of referring to network folders (and the PCs which host those folders) without using Windows drive mappings. For example lets say that my PC is called PGTIPS and on that PC I have a folder D:\stuff\goodstuff which I decide to make public, so I set up a windows share named PGSTUFF and give read access to Everyone. Then other people on the network can simply open up Explorer and type \\PGTIPS\PGSTUFF in the address bar and bingo they get a list of the files in that folder. (Other people can also set up a Windows drive mapping to that folder, so they could get windows to map \\PGTIPS\PGSTUFF to say drive H:. But the thing is that H: would only be available to the user that set-up the drive mapping - if another user logged in to their PC they would not have H: available).

So, in summary, I think you need to:
1. find out the set-up of LIVE and where this network folder and your ASP pages fit into this set-up.
2. get access to a DEV webserver and set it up so that the relationship between the folder where your ASP pages will go and the network folder you want to search is the same as on LIVE (this will ensure that your DEV ASP does not need to be changed to fit on LIVE).

I hope this helps you. Let me know If I've misunderstood anything, and please feel free to post other queries about this. :D

rgds
Phil
Reply With Quote
  #8 (permalink)  
Old September 4th, 2003, 09:46 PM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default

Hmmm... Surprised to see such a long reply from you pgtips, thanks anyway...

Yah, about my web development, i just want to to take note this factor, i'm actually not searching in the network folder[xxx02] but another server[aaa06] provided by the same company... What they told me is, it's better not to use IIS since they've provided me with a network folder[LIVE].. You got me?;)

It's just not the right way of doing the search in this way, because if i do so, i'll be searching through [xxx02]'s local drive[aaa06] mapped by the server itself. Remember you mentioned about mapping H:\? it's exactly the same.. They did mapping of K:\ to this [aaa06] for each and every computer that is connected to their network in this company of mine.

So, what they exactly want is not like this, they wanted me to learn to communicate[using ASP codes] directly to [aaa06] instead of talking to the K:\ of every computer first. I don't really know is there any ASP coding that can do such thing, but I'm willing to learn, right now i'm stuck...

Clear me if you got doubts of my explanation. Thanks for offering help to me, i appreciate a lot...

i'm a beginner, hoping to learn more.. please help... thanks a lot
Reply With Quote
  #9 (permalink)  
Old September 5th, 2003, 03:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Oh man, I think we just don't talk the same language. For me you still haven't answered the basic question of what is the relationship between the IIS server that will run your ASP and the folder you want to search.

You say they want you to talk directly to aaa06. If that's not on the same server that will be running your ASP then you need to do some work to allow your ASP access.

I've just posted this link to a similar (well it sounds similar to me anyway ;)) question. Go to http://support.microsoft.com and look for Microsoft Knowledge Base Article 197964 which is entitled "PRB: Cannot Access Remote Files with the FileSystemObject". See if the symptoms it describes are what you're experiencing.

rgds
Phil
Reply With Quote
  #10 (permalink)  
Old September 7th, 2003, 09:24 PM
Authorized User
 
Join Date: Aug 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to wenzation
Default

Think you don't get me either.

There is no more IIS used in my case. This network folder is able to run my ASP application. All i need to do is communicate to the other server(K:\) using my ASP application. You got any help on that? These two servers are running on same LAN.

i'm a beginner, hoping to learn more.. please help... thanks a lot
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating folders on network share JonniP Access VBA 1 January 3rd, 2007 03:51 PM
Listing shared network folders in Java ravishakya Pro Java 0 September 7th, 2006 10:06 AM
Copy Files and Folders on Local Network rupakroy5 VB.NET 2002/2003 Basics 1 May 22nd, 2006 10:09 AM
Report scheduling and deposit on network drives. bjswift BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 October 3rd, 2005 01:12 PM
FSO - Network Drives - Please help! sparkyUK Classic ASP Basics 8 August 23rd, 2004 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.