Author |
Topic |
|
DJWillis
Starting Member
United Kingdom
39 Posts |
Posted - 03 November 2000 : 08:11:19
|
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
|
After testing, I will add to the NT selection. We would not need the new field in the database
Thanks |
|
|
Kal Corp
Average Member
USA
878 Posts |
Posted - 06 November 2000 : 10:57:21
|
Still Getting the error on the screen. Looks like it is stoping the code |
|
|
DJWillis
Starting Member
United Kingdom
39 Posts |
Posted - 14 November 2000 : 05:50:49
|
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" |
|
|
DJWillis
Starting Member
United Kingdom
39 Posts |
Posted - 14 November 2000 : 10:59:19
|
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" |
|
|
|
Topic |
|