 |
| Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Professional 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
|
|
|
|

October 5th, 2005, 11:44 AM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP Classic VBScript GetFolder() method
Hey all,
Been writing C++ for years and C# for a year now. Currently helping my boss get his asp page going that he developed from a different region. On the page is a documents library that uses vbscript to run it. It uses the objFolder.GetFolder() object to get the folder headers. It has one variable you store the base folder in and it goes through a series of loops building paths deeper up to 4 levels. This solution was originally developed for the filde shares to be on the same machine as the app server, different drive though. We are deploying it here and has the files located on a different server as a share than the application server. I am using UNC paths now instead of drive letters. I am getting the error in the code that it can't locate folder for the GetFolder() method. It works in our test environment but the files are on the same drive as the server. We found out it is a permissions thing but don't know what permissions to assign where for the app server to be able to have the permissions to list the directories.
So the questions I have is:
In classic asp what account does the app server use when accessing folders via objFolder.GetFolder() object method?
This is in an active directory domain. 1 domain, 1 forest, don't seem to see the app server's account IUSR_(servername) in AD anywhere either but it is present on the app server.
|
|

October 5th, 2005, 11:48 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
By default, a classic ASP page runs under IUSR_MachineName which is a *local* account so it doesn't have any network rights.
Check out this FAQ for a solution:
http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=276
You may also want to read this FAQ to determine if IUSR_MachineName is indeed the right account to use:
http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=287
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 5th, 2005, 01:36 PM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Or, is it a clien-side vs. server side codes thing?
"...developed for the filde shares to be on the same machine as the app server" using vbscript, and now, "....We are deploying it here and has the files located on a different server as a share than the application server".
HTH.
|
|

October 5th, 2005, 02:33 PM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, it is server vs server ultimately as that is the issue we are having it with. We are currently setting up in our test environment another much with just xp Pro on it to function as a file location for testing and we are going to try and authenticate method. I do know in our live environment using authentication isn't working. Something may not be passing on the user's credentials. Funny thing they are mine and I have admin access to everything.
This code is not mine and it took me awhile to decipher as I am not nearly proficient in VB as I am in C#/C++.
If you are wondering how we are going to expand off this page. Everything new being developed in in ASP.NET(C#). Once I get a test machine up we are going to test it in our test environment and see if it works there. Might be something quirky in the domain.
|
|

October 5th, 2005, 03:22 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Is the ASP page running under the context of IUSR_MachineName (with anonymous access) and you're trying to access files remotely?
Or do you have a different setup? Is your account "trusted for delegation"?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

October 5th, 2005, 09:06 PM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
We actually switched it to windows suthentication and had me access the site. I have admin access on the app server and filesharing server. My account is a domain account. Still having issues with the object accessing the folder. This is one of the most headache things about web app development. Permissions the accounts the app assumes. Let me make sure I get this right. With windows authentication selected on my site, you have to have a domain account to access the site and the app uses that user's credentials for access to other resources? If I have anonymouse on, the app server will use the name and account in the box below but for it to be able to access the fileshare server I would need to create a local account duplicate to that on the IIS server on the FS server and grant it rights to the share?
|
|

October 6th, 2005, 01:24 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
If you're talking about classic ASP only, that's about right. (For ASP.NET things are different).
In the anonymous case, you can either copy the IUSR_MachineName account to the FS and give an explicit password to this account on both machines. You could also create a brand new (domain) account and use that.
However, there is also something called "delegation", which may be what's causing your problems. Does the file server itself have shares you try to access? That is, are more than two machines involved? By default, an account used on IIS can access the FS, but cannot go beyond that machine, unless the account is trusted for delegation and kerberos is used.
You may want to read this for more details about the different concepts: http://msdn.microsoft.com/library/de...entication.asp
It's targeted at ASP.NET, but the concepts apply to ASP as well.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 5th, 2006, 07:56 PM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I thought I should get back to you Imar to let you know the issue back then was delegation. Never heard of that before until then. had to go a different approach for our shares since our director does want them on shares seperate than the app server and our security team doesn't do delegation accounts hehe.
|
|

June 6th, 2006, 12:54 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Thanks for the update.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|
 |