in message : Hi Roland,
Hi Dan... great information.
: Thanks. Right, let's see if we can get some sense out of this...
I'm ready! (O:=
: The code you sent me I tried, and it works on PWS but not on IIS. Very
odd.
: I am indeed running IIS 5.1 on XP as a local server, so there's nothing
else
: involved. and all the directories have the "directory browsing" enabled in
: IIS.
You do not need nor do you want directory browsing. This will make all of
your server-side code available to anyone unless you have a default document
in the subdirectory. We can go over that later.
: They don't however have "anonymous access" setup, although I have tried
: this and it makes no difference.
You set the anonymous user access at the site level in Internet Services
Manager. It is located on the Directory Security tab, click edit under
Anonymous Access and Authentication Control, then click to check Anonymous
Access to make sure it is enabled. Click Edit under that heading and make
sure the user is iusr_computername (mine is iusr_fs1) and check to allow
IIS, if it is not already checked, to control the password. It makes this
change in the user settings for the iusr_computername account.
If any of these are not set, I need to know which ones because if the
iusr_computername password has been changed, you may have to edit it the
first time but don't worry about it for now.
: As far as I can tell, it's either something to do with permissions, or the
: location of the folder and server.mappath(). Im trying to display a list
of
: the folders in the following folder on the C drive...
:
: c:\inetpub\wwwroot\darts\library\documents
:
: .. im doing it from an asp file in the \library directory, so, i would
: assume mappath("./") would give me a list of what's in library, and
: mappath("./documents/") or mappath("/documents/") would get me into the
: folder I actually want. However. I've tried every possible combination I
can
: think of, to no avail.
The permissions of the anonymous user account is one area and you have a
misunderstanding here.
The web root is:
virtual: /
physical: c:\inetpub\wwwroot
Server.MapPath works from the web root unless you specify the parent
directory (..).
So, using your paths listed above, let's make some corrections.
.. is a representation of the current directory.
... is a representation of the parent directory.
Server.MapPath works from either the web root, or from a directive (.) or
(..).
.. and .. are relative to the current directory and not relative from the
root.
Since / is always the web root, if you always start here, you always know
where you are. I never use current or parent directives.
So, if the documents directory physical path is:
c:\inetpub\wwwroot\darts\library\documents
.... then the virtual path is:
/darts/library/documents
To use Server.MapPath from the relative root, you address it as:
Server.MapPath("/darts/library/documents")
If you do it this way, you do not have to know which subdirectory you're
currently in.
For this to work:
Server.MapPath("./documents")
.... /darts/library has to be your current subdirectory.
: Something else that might have something to do with it... I've never been
: able to access the server from the rest of the network, like i can with
PWS.
: If i go to IE and do
http://development/ (the machine name) I get nothing
: and if i go to 10.0.0.1 (the xp machines net addy) i get an "unauthorized"
: page. THAT makes me think the permissions are stuffed somewhere.......
Yes, this has to do with anonymous user access.
: Hope any/all/some of that is useful to you in solving this problem.
We're getting there.
: Thanks for your perciverance!
You're welcome.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp