BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ISAPI to using FindFirst

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
lonnie
Guest





PostPosted: Tue Jul 05, 2005 1:46 am    Post subject: ISAPI to using FindFirst Reply with quote



procedure TwmMain.ppMainHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
var
Srh : TSearchRec;
begin
if TagString = 'directory' then
begin
ReplaceText := '<select name="directory">';
if FindFirst('\ServerDataFile*.*', faDirectory, Srh) = 0 then
begin
repeat
if ((Srh.Attr and faDirectory) = faDirectory) then
ReplaceText := ReplaceText + '<option value="' + Srh.Name + '">'
+ UpperCase(Srh.Name);
until FindNext(Srh) <> 0;
FindClose(Srh);
end;
ReplaceText := ReplaceText + '</select>';
end;
end;

I have this function to get the directory name from another server's share
folder, but return nil.

If using 'C:*.*' instead of '\ServerDataFile*.*', then it can get
directory from c: ! I don't know why ISAPI cannot get this.

If I change this function from ISAPI to EXE program, then it can get the
directory name from other server, the problem is only ISAPI cannot get
directory name from other server's data folder.

I have tried map the drive Z to connect the other server's data folder, but
also cannot get the directory name.

Would you help me ?

Lonnie


Back to top
Jeff Butterworth
Guest





PostPosted: Tue Jul 05, 2005 11:46 pm    Post subject: Re: ISAPI to using FindFirst Reply with quote



I'm not at ISAPI expert by any means but does the user that the ISAPI is
running as have permission to browse the network?


Quote:
Would you help me ?

Lonnie





Back to top
lonnie
Guest





PostPosted: Wed Jul 06, 2005 1:54 am    Post subject: Re: ISAPI to using FindFirst Reply with quote



How to check that ?

"Jeff Butterworth" <jefbut (AT) drs (DOT) com.au> ¦b¶l¥ó
news:42cb1bcf$1 (AT) newsgroups (DOT) borland.com ¤¤¼¶¼g...
Quote:
I'm not at ISAPI expert by any means but does the user that the ISAPI is
running as have permission to browse the network?


Would you help me ?

Lonnie







Back to top
Del M
Guest





PostPosted: Wed Jul 06, 2005 2:04 am    Post subject: Re: ISAPI to using FindFirst Reply with quote

Depending on you context you ISAPI program pretends to be a user called
"ISUR_machine name " or IWAM_machine name ..
This user has to have rights to access directories on either the local
machine or anyother machine in then network. There are a bunch of ways to
give it those rights, like adding them to a group that already has the
rights, etc.


Back to top
R. Hoek
Guest





PostPosted: Wed Jul 06, 2005 12:57 pm    Post subject: Re: ISAPI to using FindFirst Reply with quote

As far as I know. It is possible to set the useraccount on which a ISAPI-DLL
runs...

--
Regards,

Ronald Hoek

Applicationdevelopper
ComponentAgro B.V.


"lonnie" <lonniekong (AT) geologistics (DOT) com.hk> schreef in bericht
news:42c9e67c$1 (AT) newsgroups (DOT) borland.com...
Quote:
procedure TwmMain.ppMainHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
var
Srh : TSearchRec;
begin
if TagString = 'directory' then
begin
ReplaceText := '<select name="directory">';
if FindFirst('\ServerDataFile*.*', faDirectory, Srh) = 0 then
begin
repeat
if ((Srh.Attr and faDirectory) = faDirectory) then
ReplaceText := ReplaceText + '<option value="' + Srh.Name +
'">'
+ UpperCase(Srh.Name);
until FindNext(Srh) <> 0;
FindClose(Srh);
end;
ReplaceText := ReplaceText + '</select>';
end;
end;

I have this function to get the directory name from another server's share
folder, but return nil.

If using 'C:*.*' instead of '\ServerDataFile*.*', then it can get
directory from c: ! I don't know why ISAPI cannot get this.

If I change this function from ISAPI to EXE program, then it can get the
directory name from other server, the problem is only ISAPI cannot get
directory name from other server's data folder.

I have tried map the drive Z to connect the other server's data folder,
but
also cannot get the directory name.

Would you help me ?

Lonnie





Back to top
Del M
Guest





PostPosted: Wed Jul 06, 2005 2:39 pm    Post subject: Re: ISAPI to using FindFirst Reply with quote

You dont want to change the IUSR and IWAM accounts for ISAPI. You just want
to give those users the proper rights.


Back to top
Rob Roberts
Guest





PostPosted: Wed Jul 06, 2005 2:47 pm    Post subject: Re: ISAPI to using FindFirst Reply with quote

Quote:
You dont want to change the IUSR and IWAM accounts for ISAPI. You just
want to give those users the proper rights.

I disagree with that. I always create a special user account with access
rights to all the necessary resources and then set the ISAPI DLL up to run
under that account. Especially if the ISAPI DLL needs access rights to any
network (non-local) resources, since it is not possible to give the
IUSR_MachineName and IWAM_MachineName accounts access to network resources.
But it is important to note that you DON'T want to change the anonymous user
for the site. That should remain the IUSR_MachineName account. You only
want to change the account that the ISAPI DLL runs under.

--Rob Roberts



Back to top
Del M
Guest





PostPosted: Thu Jul 07, 2005 12:00 am    Post subject: Re: ISAPI to using FindFirst Reply with quote

I gave him that advise because he is a novice I think from the question and
it would not be good to encourage him to change those accounts without
knowing exactly what he was doing. Since when cant you give rights to the
default ISAPI user? I never had a problem, it's just another user as far as
I can tell. I usually just dump them into a special group and control the
rights for the group so that I dont have to change each one individually.


Back to top
Rob Roberts
Guest





PostPosted: Thu Jul 07, 2005 3:48 pm    Post subject: Re: ISAPI to using FindFirst Reply with quote

Del,

Quote:
Since when cant you give rights to the default ISAPI user? I never
had a problem, it's just another user as far as I can tell. I usually
just dump them into a special group and control the rights for the
group so that I dont have to change each one individually.

Hmm, you might be right about that. I don't remember for sure right
offhand. But it became an issue for me when I needed to give an ISAPI DLL
access rights to directories and files on a Novell server. That is
definitely not possible with the IUSR_MachineName user (at least with Novell
3.x, which is what I was dealing with in this case). For that I set up a
user with the necessary rights on the Novell server, and then created a
Windows domain user with the same name and password, and changed the ISAPI
DLL to run under that user's account. That allows the ISAPI DLL to silently
log in to the Novell server when it needs access to resources there.

--Rob Roberts



Back to top
Del M
Guest





PostPosted: Fri Jul 08, 2005 2:05 am    Post subject: Re: ISAPI to using FindFirst Reply with quote

Ok .. sure in that case you have to get past Novell so you need a valid
Novell userid to allow access to Novell resorces. I haven't encountered any
mixed Win and Novell in years. Usually they have one or the other but not
both. Makes my job easier for sure. I used to despise Novel ... now I just
despise Windows :-)


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.