How Can I use the login Domino to ASP programm or how can I export LDAP from Domino to LDAP ASP

Hi, I have some web page which they’ve made with Domino and others have made with ASP. I want to know how if I logon with Domino the users can go to ASP web page, else can’t go. I have two ways, one is export LDAP domino to ASP. I haven’t found how I can export it.

The other is create an object Domino, but when I make this object I receive this message “Ran out of memory”.

Thank you for all, I'm looking forward to receiving your aid.



 Yours sincerely....

Roger Fajula.

PD: I hope my English is enough good to understand it. I make a lot of mistakes.

Subject: How Can I use the login Domino to ASP programm or how can I export LDAP from Domino to LDAP ASP

Hi Roger,

So let me make sure I understand what you are trying to do.

  1. You want to use domino security for your asp applications, right?

  2. You would also like to use domino as a front end for allowing users to access a particular web page or site, right?

Option 1. If this is the case the best way is to use ldap for authenication. If you receive a successful login then allow them to go to the next page.

Option 2. You would build a custom login using the domcfg template on your server but I think option 1 would do the trick.

I am not a expert in ASP programming but I thought I would take a shot at it and here is what I came up with. Not pretty but it works.

This code is designed to preform a domino ldap lookup and can also be used for authenication.

You will need:

IP works -installation required

  1. http://www.nsoftware.com/default.aspx

  2. Click on Platforms / IDEs → ASP

  3. Select IP*Works!V6 ASP Edition

  4. Trial version will work.

Let me know if it works for you.

Ted Ford

ewizard2@cox.net

				 <tr><td>LDAP Server: <td><input type="text" name="server" value="mcd01" size="30">

				 <tr><td>Query:<td><input type="text" name="query" value="" size="50">

				 <tr><td>Pass:<td><input type="password" name="myPassword" size="50">

				 <tr><td><td><input type="submit" value="Search!">

<%

If Request(“REQUEST_METHOD”) = “POST” Then

Dim ldap

Set ldap = Server.CreateObject(“IPWorksASP6.LDAP”)

ldap.ServerName = Request.Form(“server”) 'LDAP Server Name from Request form

ldap.SearchSizeLimit = 100

'at most 100 results

password = Request.Form(“myPassword”)

'retrieving password from request form

username = Request.Form(“query”)

'retrieving username from request form

 if ( password = "" )  then				

 	password = "nopassword"						

 end if

 if ( username = "" ) then

 	username = "no user"

 end if 

ldap.dn = username

'User name used for Ldap session

ldap.password = password

'password used for Ldap session

ldap.bind

'establishing a session with ldap.

’ if result code is 0 and description is OK then you have a successful login. If result code is 49 and description

’ is "Invalid Credentials, then you will be bounded as anonymous

if ldap.NextResult = 0 then

’ if result code is 0 and description is ok = sucessful login

if ldap.ResultDescription = “[ok]” then

Response.Write(“it worked”)

’ set the required attributes

ldap.AttrCount = 1

ldap.AttrType(0) = “mail”

'email for addresses etc…

ldap.Search “cn=” & Request.Form(“query”)

While ldap.NextResult = 1

'1 is a search result

Response.Write "
Found Name: " & ldap.ResultDN & Chr(13) & Chr(10)

Response.Write "
Found Email: " & ldap.AttrValue(0) & Chr(13) & Chr(10)

Wend

else

Response.Write(“Not Authorized”)

end if

end if

’ Response.Write(“
” & ldap.ResultCode)

’ use the above statement to see result code

Response.Write “”

End If

%>