Solved

ASP Novell User Lookup / Login

Posted on 2004-08-10
5
324 Views
Last Modified: 2012-08-13
I am attempting authenticate users via their Novell login information from
a simple asp page (NOT .NET). I am new to Novell and I have run into a
bunch of problems that I cannot figure out. For some reason when I search
our from the root of our tree I cannot find any users. If I search within
my Context I can find some users but not all but if I search outside my
context I find nothing. I have searchScope set to qrySearchSubtree which
should search all entries. I assumed that this may be due to permissions
but I ran another novell sample and I am able to traverse the entire tree
via code (below). So I am lost, anyone know what I may be doing wrong?



'------- SEARCH CODE ------------------------------
DoSearch("Doe_John","ComanyName") -> ( zero results )
DoSearch("Doe_John","ComanyName\USA") -> ( zero results )
DoSearch("Doe_John","ComanyName\USA\WashingtonDc\Users") -> ( user Found )


(from novell site)
Sub DoSearch (strUserCn, treeName)
        Dim retCode, objectFilter, treeNameDim,nwdirQ, results, result  
        ObjectFilter= "User(CN = "&strUserCn&")"
        'On Error Resume Next  
        set nwdirQ=Server.CreateObject("NWDirQueryLib.NWDirQuery.1")  
        nwdirQ.FullName="NDS:\\"+treeName
        nwdirQ.maximumResults=100  
        nwdirQ.SortKeys="CN"  
        nwdirQ.Filter=objectFilter  
        nwdirQ.SearchMode=0   ' synchronous !  
        nwdirQ.SearchScope=2  
        set results=nwdirQ.Search
        Response.Write "Found ("&results.count&") objects"  
        For each result in results            
         response.write  
result.FullName", "&result.Layout&"")            

        Next      
        Set nwdirQ=Nothing
      End Sub

'--TRAVERSE CODE-----------------------------------------------------
 
      Sub ReadContainer(context,level)
        Dim entry, output, newContext, name
         On Error Resume Next  
         NWDir1.FullName=context  
         For each entry in NWDir1.entries                  
          If err.number Then        
            err.number=0        
            Exit For      
          End If
          name = entry.ShortName
          response.write vbnewline
          If entry.Layout.Container=TRUE then        
            Response.Write ""
              newContext=context+"\"+entry.ShortName                  
              call ReadContainer(newContext ,level+1)      
            Response.Write ""
          else
            Response.Write ""          
          End If      
          totalObjects = totalObjects +1  
        Next
      End Sub
     
      Sub ListDSTree(treeName)
        Dim retcode, fullName, level  
        NWDir1.FullName = NWDir1.FullNameFromTreeAndContext
(treeName,"[Root]")  
        fullName=NWDir1.LoginName  
        response.write "(Listing the whole DS tree structure  may take
some time !)"  
        response.write "" & treeName & "   "  
        totalObjects=1        
        Response.Write ""
          call ReadContainer("NDS:\\"+treeName,1)        
        Response.Write ""        
        response.write "Total objects found: " & totalObjects
      End Sub
     
      dim totalObjects
      ListDSTree("TreeName")

0
Comment
Question by:bolesj
5 Comments
 
LVL 15

Expert Comment

by:joeposter649
Comment Utility
Not sure if this is your problem but sometimes you use "+" instead of "&" to concat strings.
0
 
LVL 1

Author Comment

by:bolesj
Comment Utility

The "+" signs do not seem to make a difference. They are from the Novell site and i changed them to "&" and still get the same result.

john
0
 
LVL 1

Author Comment

by:bolesj
Comment Utility

Problems were due to permissions.

Admin - Please Delete this
0
 
LVL 6

Expert Comment

by:masirof
Comment Utility
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - Refund

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

masirof
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now