Hi We have a simple asp page that query LDAP attribrute.
Everithing is working fine using a native domain account. but when
using an external account we have an error 70, acces denie.
Here's some basic info on our structure.
- Domain/Forest A with Exchange
- Domain/Forest B with external accounts.
- Forest A Trus Forest B and "Vice Versa"
- asp page on a Exchange FrontEnd server on default web site (same as
Exchange)
- asp page is using basic authentification.
- Authentification work fine using native domain account or External
domain Account.
- Getting native Windows attributes work fine with External account
but the attributes starting with "ms-Exch" do not come out.(Exchange
Attribute).
Here is the code I have. Maybe it's not optimise but it's feel free
to
argue about it.
################################################## #########################*
#############
<html>
<head>
<title>Boites mail over Quota</title>
</head>
<body>
<%
On Error Resume Next
Dim cComputerName
cComputerName = "server.domainA.com"
Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_Mailbox"
Dim sWinMgmts ' Connection string for WMI
Dim oWMIExchange ' Exchange Namespace WMI object
Dim lExchange_Mailboxes ' ExchangeLogons collection
Dim oExchange_Mailbox ' A single ExchangeLogon WMI object
'Write a heading into the output file
'oOutputFile.writeline("Nom BAL;Taille (KB);Nombre
d'elements;Statut")
Response.Write "<table border=""1""><tr
bgcolor=""#99CCFF""><td><b><center>Nom BAL</center></b></
td><td><b><center>Taille (KB)</center></b></td><td><b><center>Nombre
d'elements</center></b></td><td><b><center>Statut</center></b></td>"
' Create the object string, indicating WMI (winmgmts), using the
' current user credentials (impersonationLevel=impersonate),
' on the computer specified in the constant cComputerName, and
' using the CIM namespace for the Exchange provider.
sWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//"& _
cComputerName&"/"&cWMINameSpace
Set oWMIExchange = GetObject(sWinMgmts)
' Verify we were able to correctly set the object.
If Err.Number <0 Then
'oOutputFile.writeline("Error: " & err.number & ", " &
err.description)
Response.Write "<br>" & "Erreur : " & err.number & ", " &
err.description
Else
' The Resources that currently exist appear as a list of
' Exchange_Mailbox instances in the Exchange namespace.
Set lExchange_Mailboxes =
oWMIExchange.InstancesOf(cWMIInstance)
' Were any Exchange_Mailbox Instances returned?
If (lExchange_Mailboxes.count 0) Then
' If yes, do the following:
' Iterate through the list of Exchange_Mailbox
objects.
For Each oExchange_Mailbox in lExchange_Mailboxes
Select Case
oExchange_Mailbox.StorageLimitInfo
Case 2
Response.Write "<tr
bgcolor=""#FFFF33""><td>" &
oExchange_Mailbox.MailboxDisplayName & "</td><td>" &
oExchange_Mailbox.Size & "</td><td>" & oExchange_Mailbox.TotalItems &
"</td><td>" & oExchange_Mailbox.StorageLimitInfo & "</td>"
Case 4
Response.Write "<tr
bgcolor=""#FF0000""><td>" &
oExchange_Mailbox.MailboxDisplayName & "</td><td>" &
oExchange_Mailbox.Size & "</td><td>" & oExchange_Mailbox.TotalItems &
"</td><td>" & oExchange_Mailbox.StorageLimitInfo & "</td>"
End Select
Next
Response.Write "</table>"
Else
' If no Exchange_Mailbox instances were returned,
' display that.
Response.Write "WARNING: No Exchange_Mailbox instances
were
returned."
End If
End If
%>
</body>
</html>
################################## End of Code
#############################################"
If you think I should post on other newsgroup, please let me know
witch one.
Best regards.
Christian 1 2735
On 23 avr, 16:59, ouist...@gmail.com wrote:
Hi We have a simple asp page that query LDAP attribrute.
Everithing is working fine using a native domain account. but when
using an external account we have an error 70, acces denie.
Here's some basic info on our structure.
- Domain/Forest A with Exchange
- Domain/Forest B with external accounts.
- Forest A Trus Forest B and "Vice Versa"
- asp page on a Exchange FrontEnd server on default web site (same as
Exchange)
- asp page is using basic authentification.
- Authentification work fine using native domain account or External
domain Account.
- Getting native Windows attributes work fine with External account
but the attributes starting with "ms-Exch" do not come out.(Exchange
Attribute).
Here is the code I have. Maybe it's not optimise but it's feel free
to
argue about it.
################################################## #########################**
#############
<html>
<head>
<title>Boites mail over Quota</title>
</head>
<body>
<%
On Error Resume Next
Dim cComputerName
cComputerName = "server.domainA.com"
Const cWMINameSpace = "root/MicrosoftExchangeV2"
Const cWMIInstance = "Exchange_Mailbox"
Dim sWinMgmts ' Connection string for WMI
Dim oWMIExchange ' Exchange Namespace WMI object
Dim lExchange_Mailboxes ' ExchangeLogons collection
Dim oExchange_Mailbox ' A single ExchangeLogon WMI object
'Write a heading into the output file
'oOutputFile.writeline("Nom BAL;Taille (KB);Nombre
d'elements;Statut")
Response.Write "<table border=""1""><tr
bgcolor=""#99CCFF""><td><b><center>Nom BAL</center></b></
td><td><b><center>Taille (KB)</center></b></td><td><b><center>Nombre
d'elements</center></b></td><td><b><center>Statut</center></b></td>"
' Create the object string, indicating WMI (winmgmts), using the
' current user credentials (impersonationLevel=impersonate),
' on the computer specified in the constant cComputerName, and
' using the CIM namespace for the Exchange provider.
sWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//"& _
cComputerName&"/"&cWMINameSpace
Set oWMIExchange = GetObject(sWinMgmts)
' Verify we were able to correctly set the object.
If Err.Number <0 Then
'oOutputFile.writeline("Error: " & err.number & ", " &
err.description)
Response.Write "<br>" & "Erreur : " & err.number & ", " &
err.description
Else
' The Resources that currently exist appear as a list of
' Exchange_Mailbox instances in the Exchange namespace.
Set lExchange_Mailboxes =
oWMIExchange.InstancesOf(cWMIInstance)
' Were any Exchange_Mailbox Instances returned?
If (lExchange_Mailboxes.count 0) Then
' If yes, do the following:
' Iterate through the list of Exchange_Mailbox
objects.
For Each oExchange_Mailbox in lExchange_Mailboxes
Select Case
oExchange_Mailbox.StorageLimitInfo
Case 2
Response.Write "<tr
bgcolor=""#FFFF33""><td>" &
oExchange_Mailbox.MailboxDisplayName & "</td><td>" &
oExchange_Mailbox.Size & "</td><td>" & oExchange_Mailbox.TotalItems &
"</td><td>" & oExchange_Mailbox.StorageLimitInfo & "</td>"
Case 4
Response.Write "<tr
bgcolor=""#FF0000""><td>" &
oExchange_Mailbox.MailboxDisplayName & "</td><td>" &
oExchange_Mailbox.Size & "</td><td>" & oExchange_Mailbox.TotalItems &
"</td><td>" & oExchange_Mailbox.StorageLimitInfo & "</td>"
End Select
Next
Response.Write "</table>"
Else
' If no Exchange_Mailbox instances were returned,
' display that.
Response.Write "WARNING: No Exchange_Mailbox instances
were
returned."
End If
End If
%>
</body>
</html>
################################## End of Code
#############################################"
If you think I should post on other newsgroup, please let me know
witch one.
Best regards.
Christian
up.
No one can help me ?
Regards.
Christian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: krushn |
last post by:
My objective is to get the GAL data from Exchange server 5.5 using
ASP.net page or asp page. Its a asp.net application.
Environment details:
Exchange server version: 5.5
LDAP: supports LDAP...
|
by: Vincent Nguyen |
last post by:
Hi,
I have problem create exchange 2000 mailbox using CDOEXM in my Web Service
application. The error I got was "Catastrophic failure". Here is the code
that I have:
DirectoryEntry user =...
|
by: Tim::.. |
last post by:
Hi can someone please tell me how I change this directory service query so
that it searches through each record in the active directory and returns all
the accounts!
At the moment I can only get...
|
by: mike.varley1 |
last post by:
Hi All
We are getting the warning messages below several times a day in the
app event logs on our Win2k3 server. Can anyone shed any light on the
meaning\cause of the DC issue, especially: "This...
|
by: Leon |
last post by:
I keep geting this error in the IE when trying to run the scrept below from
an ASP page. Can any one help please.
Error Type:
Provider (0x80040E37)
Table does not exist.
/gal.asp, line 43
|
by: Robert Iver |
last post by:
Hello,
I am developing an application in C# using VS .NET 2005 that
will be accessing and updating Active Directory via LDAP. So, far I
have written the main portions, but now I am stuck on the...
|
by: ouistyty |
last post by:
Hi We have a simple asp page that query LDAP attribrute.
Everithing is working fine using a native domain account. but when
using an external account we have an error 70, acces denie.
Here's...
|
by: Magnus R |
last post by:
In VB.Net I'm trying to find out the names of what Administrative Groups
exist by querying Active Directory. The problem is when I try and query the
children of the key LDAP://CN=Administrative...
|
by: rage2001 |
last post by:
I have a script (ASP) written which creates an account in AD, creates a
folder on our file server and sets its permissions, and then creates a
mailbox on the exchange server and sets its...
|
by: rbukkara |
last post by:
Hi,
I have got the following error while trying to add a user in the LDAP Directory.
javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu'
I have...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |