These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Different Roots

I don't want a "dynamic" root, but I would like to have 3 differnet links on a page launching WebExplorer Lite, each with its own password and root diectory.

1) Should I just duplicate the entire WebEx directory 3 times and change the config.asp file in each for different passwords and roots?

2) Is there a better way?

3) Should I expect any "odd" problems doing this? 

What about multiple people running different instances at the same time?

Thanks.
Phil White 5/20/2005 10:03 PM
I think what you suggested in step 1 will not be very efficient, alternatively you can pass a url variable:

i will be using if statements but you may alter and use a select case statement instead.

in config.asp you can add the following code:


Dim wexPassword
Dim wexRoot

if Request.QueryString("FolderPath") = "folder1" then
    wexPassword = "folder1" 'this will set the password to "folder1"
    wexRoot = "/" & Request.QueryString("FolderPath") 'this will set the path
end if

if Request.QueryString("FolderPath") = "folder2" then
    wexPassword = "folder2"
    wexRoot = "/" & Request.QueryString("FolderPath")
end if

if Request.QueryString("FolderPath") = "folder3" then
    wexPassword = "folder3"
    wexRoot = "/" & Request.QueryString("FolderPath")
end if


and in default.asp change line 601 "action" value in the form attribute from

<%=scriptName%>

To 

<%=scriptName%><%="?FolderPath="%><%=Request.QueryString("FolderPath")%>


make sure that you replace the Const wexPassword as they will be redefined as a variable under each if statement



to test this you can type the url like or make a link which will pass the path as a variable

youraddress.com/default.asp?FolderPath=folder1


lastly to make sure that you dont get people browsing your entire directory other than the ones which have passwords, i will leave it as a challenge for you. as an intuitive user will be able to define / change the FolderPath variable to something else if they know it, e.g. folder4 if it exists or if they remove the current value of FolderPath to ="".

to give you a clue have all of the above if statement in another if statement which checks for the value of FolderPath to see if it is = "folder1" or = "folder2" or = "folder3" or = "folder4" and enter the inner if statements otherwise redirect to an error page which you will have to create.
Halgurd Saleh 5/24/2005 5:57 AM
I tried this and it seems to work, although when i change the url to folder2 after loggin in to folder1 i am able to see the contents? any ideas why?

thanks
Rob Atkinson 5/30/2005 11:26 AM