Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Authentication: NT
 Checking for ADSI.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

DJWillis
Starting Member

United Kingdom
39 Posts

Posted - 03 November 2000 :  08:11:19  Show Profile  Send DJWillis an ICQ Message
Hi All,

A while back Kal/Gor metioned if there was a way to check if ADSI was installed.

The ASP below should do the trick.
Just drop it in as an error check around the existing NT full name code.

'Begin Code

Dim oADSI

' Check ADSI is working
Set oADSI = GetObject("WINNT:")
If Err.Number = 0 Then
%>

'Normal Code Here

<% Else %>

'Error handleing code/message here

<%
Err.Clear
End If
%>

'End Code


Regards

John Willis

"You can have any error screen, as long a it's blue"

Kal Corp
Average Member

USA
878 Posts

Posted - 03 November 2000 :  13:39:24  Show Profile  Visit Kal Corp's Homepage
After testing, I will add to the NT selection. We would not need the new field in the database

Thanks
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 06 November 2000 :  10:57:21  Show Profile  Visit Kal Corp's Homepage
Still Getting the error on the screen. Looks like it is stoping the code
Go to Top of Page

DJWillis
Starting Member

United Kingdom
39 Posts

Posted - 14 November 2000 :  05:50:49  Show Profile  Send DJWillis an ICQ Message
Hmmm,

Let me take a look, I use a slightly modified version of that code (to work as a function) here and it works OK as a generic check for ADSI on about 5 of my ASP apps.

Chances are I goofed :-))

Regards

John Willis

"You can have any error screen, as long a it's blue"
Go to Top of Page

DJWillis
Starting Member

United Kingdom
39 Posts

Posted - 14 November 2000 :  10:59:19  Show Profile  Send DJWillis an ICQ Message
OK, I am officially thick. <img src=icon_smile_shy.gif border=0 align=middle>.

This is the code I wrote for use as a sub routine some while back and I have tested this works here OK.
You should be able to modify this to work fine with Snitz, I can't get it 100% correct within Snitz as I don't have Kal's latest NT Auth code.
It's just copied stright from my Include. and has some test info I poped in.

----

<%
Option Explicit
' ADSI Check for use in Global Include for Wessex ASP apps.
' ADSICheck.asp
' For use in Wessex Water Intranet pages.
' Written by John Willis, Intranet Team Leader (21/05/00)

TestADSI

%>

<HTML>
<HEAD>
</HEAD>
<BODY>

<%
Sub TestADSI

'Begin ADSI Code here

Dim objADSI

' Check ADSI is working

On Error Resume Next
Set objADSI = GetObject("LDAP:")
If Err.Number <> 0 Then

'Error handleing code/message here
Response.write "ADSI need's to be installed for this feature to work on this server."
Err.Clear
Else

'Normal Code Here
'Such as enableing the NT full name, doing an LDAP: lookup or calling another function.

'Test Debug message.
Response.write "ADSI 2.x works on this PC and this feature should work fine"

End If

End Sub

'End Code
%>

</BODY>
</HTML>

----

Regards

John Willis

"You can have any error screen, as long a it's blue"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07