Discussion:
Catastrophic failure" 0x8000FFFF
(too old to reply)
Candi Suriano
2007-10-04 21:25:03 UTC
Permalink
I'm creating a user in Active Directory, setting the mail nickname and then
trying to mail enable them. This code has worked for 18 months with very few
problems. Now there's a new twist. I have to create the user and mailbox in a
different domain than the one I'm running in. I impersonate a domain admin
in the domain. Everything works up to the point where it tries to create the
mailbox. Then I get a "Catastrophic failure" 0x8000FFFF error message. Does
anyone have any idea what could be wrong?

I've appended a sample of the code to the end of this message. All of the
LDAP strings have been checked by multiple pairs of eyes. They specify valid
containers in AD and valid stores in Exchange. And I've left out some
details such as exception handling and the code for impersonation for the
sake of brevity.
--
Candi

Private Sub Create()
Dim newIdentity As System.Security.Principal.WindowsIdentity = Nothing
Dim newContext As
System.Security.Principal.WindowsImpersonationContext = Nothing
newIdentity = GetWindowsIdentity(GetValueFromConfig("CECUser1"),
"CEC", GetValueFromConfigEncrypt("CECPassword1"))
newContext = newIdentity.Impersonate
CreateUser()
newContext.Undo
End Sub


Private Sub CreateUser
Dim entry As DirectoryEntry = Nothing
Dim user As DirectoryEntry = Nothing
Dim strPath As String = String.Empty
Dim strExchangePath As String = String.Empty
Dim Mailbox As CDOEXM.IMailboxStore
Dim username As String = "testUser"

strPath =
String.Format("LDAP://{0}/OU={1},OU={2},OU={3},OU={4},OU={5},{6}", dcName,
"Users", "OEG Staff", "Hoffman", "850", "Campuses",
"DC=CEC,DC=root,DC=careered,dc=com")
entry = New DirectoryEntry(strPath)
user = entry.Children.Add("CN=" & username, "User")
with User

.Properties("userPrincipalName").Add(String.Format("{0}@{1}", username,
"cec.root.careered.com"))
.Properties("sAMAccountName").Add(username)
.CommitChanges()
SetProperty(user, "mail", username & "@careered.com")
strExchangePath =
String.Format("CN={0},CN={1},CN=InformationStore,CN={2},CN=Servers,CN={3},CN=Administrative
Groups,CN={4},CN=Microsoft Exchange,CN=Services,CN=Configuration,{5}", "MS1",
"First Storage Group", "850EMX001", "CEC", "Careered",
"DC=root,DC=careered,DC=com")
Mailbox = DirectCast(user.NativeObject, CDOEXM.IMailboxStore)
Mailbox.CreateMailbox(strExchangePath)
user.CommitChanges()
end sub
--
Candi
John Fullbright
2007-10-19 02:57:08 UTC
Permalink
Back in the Exchange 2000 world, the RUS would throw an 8000ffff. It was
basically a "can't get there from here" error due to name resolution failure
or permissions failure. Given that:

1. How are you doing your LDAP binding and where to?
2. In DNS name resolution for the DC in the domain you are attemting to
write to work?
3. Do you have the permissions necessary to write in the target domain with
the credentials you are using?
Post by Candi Suriano
I'm creating a user in Active Directory, setting the mail nickname and then
trying to mail enable them. This code has worked for 18 months with very few
problems. Now there's a new twist. I have to create the user and mailbox in a
different domain than the one I'm running in. I impersonate a domain admin
in the domain. Everything works up to the point where it tries to create the
mailbox. Then I get a "Catastrophic failure" 0x8000FFFF error message. Does
anyone have any idea what could be wrong?
I've appended a sample of the code to the end of this message. All of the
LDAP strings have been checked by multiple pairs of eyes. They specify valid
containers in AD and valid stores in Exchange. And I've left out some
details such as exception handling and the code for impersonation for the
sake of brevity.
--
Candi
Private Sub Create()
Dim newIdentity As System.Security.Principal.WindowsIdentity = Nothing
Dim newContext As
System.Security.Principal.WindowsImpersonationContext = Nothing
newIdentity =
GetWindowsIdentity(GetValueFromConfig("CECUser1"),
"CEC", GetValueFromConfigEncrypt("CECPassword1"))
newContext = newIdentity.Impersonate
CreateUser()
newContext.Undo
End Sub
Private Sub CreateUser
Dim entry As DirectoryEntry = Nothing
Dim user As DirectoryEntry = Nothing
Dim strPath As String = String.Empty
Dim strExchangePath As String = String.Empty
Dim Mailbox As CDOEXM.IMailboxStore
Dim username As String = "testUser"
strPath =
String.Format("LDAP://{0}/OU={1},OU={2},OU={3},OU={4},OU={5},{6}", dcName,
"Users", "OEG Staff", "Hoffman", "850", "Campuses",
"DC=CEC,DC=root,DC=careered,dc=com")
entry = New DirectoryEntry(strPath)
user = entry.Children.Add("CN=" & username, "User")
with User
"cec.root.careered.com"))
.Properties("sAMAccountName").Add(username)
.CommitChanges()
strExchangePath =
String.Format("CN={0},CN={1},CN=InformationStore,CN={2},CN=Servers,CN={3},CN=Administrative
Groups,CN={4},CN=Microsoft Exchange,CN=Services,CN=Configuration,{5}", "MS1",
"First Storage Group", "850EMX001", "CEC", "Careered",
"DC=root,DC=careered,DC=com")
Mailbox = DirectCast(user.NativeObject,
CDOEXM.IMailboxStore)
Mailbox.CreateMailbox(strExchangePath)
user.CommitChanges()
end sub
--
Candi
Candi Suriano
2007-10-23 01:02:09 UTC
Permalink
John,

Thanks for your answer. It was the name resolution problem.
--
Candi
Post by John Fullbright
Back in the Exchange 2000 world, the RUS would throw an 8000ffff. It was
basically a "can't get there from here" error due to name resolution failure
1. How are you doing your LDAP binding and where to?
2. In DNS name resolution for the DC in the domain you are attemting to
write to work?
3. Do you have the permissions necessary to write in the target domain with
the credentials you are using?
Post by Candi Suriano
I'm creating a user in Active Directory, setting the mail nickname and then
trying to mail enable them. This code has worked for 18 months with very few
problems. Now there's a new twist. I have to create the user and mailbox in a
different domain than the one I'm running in. I impersonate a domain admin
in the domain. Everything works up to the point where it tries to create the
mailbox. Then I get a "Catastrophic failure" 0x8000FFFF error message. Does
anyone have any idea what could be wrong?
I've appended a sample of the code to the end of this message. All of the
LDAP strings have been checked by multiple pairs of eyes. They specify valid
containers in AD and valid stores in Exchange. And I've left out some
details such as exception handling and the code for impersonation for the
sake of brevity.
--
Candi
Private Sub Create()
Dim newIdentity As System.Security.Principal.WindowsIdentity = Nothing
Dim newContext As
System.Security.Principal.WindowsImpersonationContext = Nothing
newIdentity =
GetWindowsIdentity(GetValueFromConfig("CECUser1"),
"CEC", GetValueFromConfigEncrypt("CECPassword1"))
newContext = newIdentity.Impersonate
CreateUser()
newContext.Undo
End Sub
Private Sub CreateUser
Dim entry As DirectoryEntry = Nothing
Dim user As DirectoryEntry = Nothing
Dim strPath As String = String.Empty
Dim strExchangePath As String = String.Empty
Dim Mailbox As CDOEXM.IMailboxStore
Dim username As String = "testUser"
strPath =
String.Format("LDAP://{0}/OU={1},OU={2},OU={3},OU={4},OU={5},{6}", dcName,
"Users", "OEG Staff", "Hoffman", "850", "Campuses",
"DC=CEC,DC=root,DC=careered,dc=com")
entry = New DirectoryEntry(strPath)
user = entry.Children.Add("CN=" & username, "User")
with User
"cec.root.careered.com"))
.Properties("sAMAccountName").Add(username)
.CommitChanges()
strExchangePath =
String.Format("CN={0},CN={1},CN=InformationStore,CN={2},CN=Servers,CN={3},CN=Administrative
Groups,CN={4},CN=Microsoft Exchange,CN=Services,CN=Configuration,{5}", "MS1",
"First Storage Group", "850EMX001", "CEC", "Careered",
"DC=root,DC=careered,DC=com")
Mailbox = DirectCast(user.NativeObject,
CDOEXM.IMailboxStore)
Mailbox.CreateMailbox(strExchangePath)
user.CommitChanges()
end sub
--
Candi
Loading...