Solved

ASP Novell User Lookup / Login

Posted on 2004-08-10
5
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Expert Comment

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

Author Comment

by:bolesj
ID: 11763691

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
ID: 11774937

Problems were due to permissions.

Admin - Please Delete this
0
 
LVL 6

Expert Comment

by:masirof
ID: 12728169
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
ID: 12752366
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 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