Click here to Skip to main content
16,004,927 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Refresh problem in Web Projects Pin
satyaki mishra22-Aug-07 2:20
satyaki mishra22-Aug-07 2:20 
AnswerRe: Refresh problem in Web Projects Pin
Talal Sultan22-Aug-07 2:35
Talal Sultan22-Aug-07 2:35 
Questionhow to access session variables/ ordinary variables in HTML Pin
Jagadeesh Jupalli22-Aug-07 1:19
Jagadeesh Jupalli22-Aug-07 1:19 
AnswerRe: how to access session variables/ ordinary variables in HTML Pin
Christian Graus22-Aug-07 1:21
protectorChristian Graus22-Aug-07 1:21 
QuestionDropdown list hiding my Drop down Menu Pin
.NET- India 22-Aug-07 1:16
.NET- India 22-Aug-07 1:16 
AnswerRe: Dropdown list hiding my Drop down Menu Pin
R. Giskard Reventlov22-Aug-07 2:18
R. Giskard Reventlov22-Aug-07 2:18 
QuestionEmbedding Real Player in ASP.NET web Application Pin
.NET- India 22-Aug-07 1:12
.NET- India 22-Aug-07 1:12 
QuestionOwa authentication through asp page Pin
Alpanama22-Aug-07 1:10
Alpanama22-Aug-07 1:10 
Hi all.

First thing of all, I am an absolutly newbie on asp programming.

We are developing an application which works this way:

A user validate through an asp.net page, a script at the server search an especifical attribute on AD, and redirect the user to an OWA page depending of that value without having to validate again on OWA page.

I can make the AD search script working, but when I mix this code with an xmlhttp to pass credentials to the owa page, it fails. I obtain an "ActiveX component can't create object: 'ADODB.Command'" error.

Here is my code:




<title>Single Sign-on



Dim objCommand, objConnection, strBase, strFilter, strAttributes
Dim strQuery, objRecordset, strUser, objRootDSE, strDNSDomain, strURL
Dim oXMLHTTP


Set objCommand = CreateObject("ADODB.Command")
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
objCommand.ActiveConnection = objConnection


Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
strBase = "<LDAP://" & strDNSDomain & ">"


strFilter = "(&(objectCategory=person)(objectClass=user)(sAMAccountName=" & strUser & "))"
strAttributes = "extensionAttribute1"


strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
objCommand.CommandText = strQuery
objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 20
objCommand.Properties("Cache Results") = False
objCommand.Properties("Size Limit") = 1

objRecordset = objCommand.Execute

Do Until objRecordset.EOF
If IsDBNull((objRecordset.Fields("extensionAttribute1").value)) <> True Then

strURL = "https://exc2k3/Exchange/"

Else
strURL = "https://exc2k7/Exchange/"

End If

objRecordset.MoveNext()
Loop

objRecordset.Close()
objConnection.Close()

Sub cmdGet_OnClick()
strUser = document.all.USER.Value
strPW = document.all.PW.Value
Set oXMLHTTP = CreateObject("microsoft.xmlhttp")
oXMLHTTP.Open "HEAD", strURL, True, strUser, strPW
oXMLHTTP.onreadystatechange = getRef("XMLHTTPStateChange")
oXMLHTTP.send ("")
End Sub

Sub XMLHTTPStateChange

strURL = document.all.URL.Value

if (oXMLHTTP.readystate <> 4) then
exit sub
end if

open(strURL)
End Sub







OWA


User:


Password:






QuestionSelected index opf dropdown within a repeater always returns 0 Pin
oceanexplorer22-Aug-07 1:10
oceanexplorer22-Aug-07 1:10 
AnswerRe: Selected index opf dropdown within a repeater always returns 0 Pin
Christian Graus22-Aug-07 1:22
protectorChristian Graus22-Aug-07 1:22 
GeneralRe: Selected index opf dropdown within a repeater always returns 0 Pin
oceanexplorer22-Aug-07 1:43
oceanexplorer22-Aug-07 1:43 
GeneralRe: Selected index opf dropdown within a repeater always returns 0 Pin
Christian Graus22-Aug-07 2:01
protectorChristian Graus22-Aug-07 2:01 
Questiondisplaying data on a chart Pin
Mamphekgo Bahula22-Aug-07 0:50
Mamphekgo Bahula22-Aug-07 0:50 
AnswerRe: displaying data on a chart Pin
Christian Graus22-Aug-07 1:19
protectorChristian Graus22-Aug-07 1:19 
QuestionTrusted Login Problem Pin
mihirhp22-Aug-07 0:34
mihirhp22-Aug-07 0:34 
AnswerRe: Trusted Login Problem Pin
R. Giskard Reventlov22-Aug-07 0:37
R. Giskard Reventlov22-Aug-07 0:37 
QuestionCompilation error Pin
Big Ralph22-Aug-07 0:31
Big Ralph22-Aug-07 0:31 
AnswerRe: Compilation error Pin
Goalie3522-Aug-07 3:11
Goalie3522-Aug-07 3:11 
QuestionAssigning roles to users using Windows Authentication Pin
JacquesDP22-Aug-07 0:10
JacquesDP22-Aug-07 0:10 
QuestionHow to refresh? Pin
kiran@p2softech21-Aug-07 23:53
kiran@p2softech21-Aug-07 23:53 
AnswerRe: How to refresh? Pin
Michael Sync22-Aug-07 0:01
Michael Sync22-Aug-07 0:01 
AnswerRe: How to refresh? Pin
\laddie24-Aug-07 0:45
\laddie24-Aug-07 0:45 
QuestionLoading Images to the page on SCROLLING only Pin
jophinmichael21-Aug-07 23:37
jophinmichael21-Aug-07 23:37 
AnswerRe: Loading Images to the page on SCROLLING only Pin
SimulationofSai22-Aug-07 0:00
SimulationofSai22-Aug-07 0:00 
QuestionBrowser compatibility problem! Pin
Affan Toor21-Aug-07 23:35
Affan Toor21-Aug-07 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.