Exchange 2010 toolbox ECP errors

We have an Exchange 2010 environment, upgraded from Exchange 2003 back in April. We removed the exchange 2003 server from the environment and turned it off.

When I attempt to launch Message Tracking, or the RBAC editor from the EMC toolbox, I am receiving the following error

Cannot index into a null array. It was running the command 'Discover-ECPVirtualDirectoryForEMC - CurrentVersion 'Version 14.1 (Build 218.15)' -UseWIA $true'.

Wondering if there could be some sort of IIS issue or something I didn't configure correctly that is not allowing a few of these tools to come up. Maybe ECP?

I can get to "Roles and Auditing" as well as "Delivery Reports" via OWA->Options, but can't access the tools via EMC.

I've been racking my brain for months on this. Anyone have any ideas?
Who is Participating?
sirakovConnect With a Mentor Commented:
Ok, I had a look based on the error you got .
The function discover-EcpVirtualDirectoryForEcm look for a sub-function called _GetSites() and there it is actually failing.

function _GetSites()
	if ($localSite -eq $null)
		return #no site - no auto discovery
	$siteList = New-Object System.Collections.ArrayList
	if ($siteDN -ne $null)
		[void] $SiteList.Add($siteDN)
	# DCR 231555: TAp DCR:Respect site-link costs with remote powershell.
	# Now go one level to find adjacent sites based on site link and add them in the site list
	if ($localSite.SiteLinks -ne $null)
		foreach ($siteLink in $localSite.SiteLinks)
			$siteDN = $null
			# block going backwords
			if (($siteLink.Sites[0] -ne $null) -and ($siteLink.Sites[0].Name -ne $localSite.Name))
				$siteDN = $siteLink.Sites[0].GetDirectoryEntry().DistinguishedName
			elseif ($siteLink.Sites[1] -ne $null)
				$siteDN = $siteLink.Sites[1].GetDirectoryEntry().DistinguishedName
			if ($siteDN -ne $null)
				[void] $SiteList.Add($siteDN)
	# When no exchange server will be found in the current site or adjacent sites, then we should search in all sites
	[void] $SiteList.Add("*")

Open in new window


There is an issue with your site(s) and/or site link .... for some reason it returns nothing.
If I were you I would go through each step from the above script and check why it fails here  >>>> if (($siteLink.Sites[0] -ne $null) -and ($siteLink.Sites[0].Name -ne $localSite.Name))

So try like this :
Open exchange power shell and start like in the script above :
It should give the your site name ... etc
Have you try to recreate the  ecp v'dir ?
>Get-EcpVirtualDirectory | Remove-EcpVirtualDirectory
>New-EcpVirtualDirectory -internalUrl "https://FQDNofYourServer/ecp"

could you post the results of :
Get-EcpVirtualDirectory |fl

Also, is it a new install of Exchange 2010 SP1 ? I'm asking this because it might be a courruption in the cashe file of the mmc itself
navigate here and delete the EMC cashe file:

Also, just in case delete the files under :
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
HornAlumAuthor Commented:
I believe I did try to remove the ECP vdirectory, but I'll try it again. It was a fresh install of Exch 2010 SP1

these are the current results of Get-ECPVirtualDirectory

RunspaceId                      : c492aedd-cddd-4c19-852c-2d73fb5a6480
Name                            : ecp (Default Web Site)
InternalAuthenticationMethods   : {Basic}
MetabasePath                    : IIS://
BasicAuthentication             : True
WindowsAuthentication           : False
DigestAuthentication            : False
FormsAuthentication             : False
LiveIdAuthentication            : False
DefaultDomain                   :
GzipLevel                       : High
WebSite                         : Default Web Site
DisplayName                     : ecp
Path                            : C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\ecp
ExtendedProtectionTokenChecking : None
ExtendedProtectionFlags         : {}
ExtendedProtectionSPNList       : {}
Server                          : SHC-CAS
InternalUrl                     :
ExternalUrl                     :
ExternalAuthenticationMethods   : {Fba}
AdminDisplayName                :
ExchangeVersion                 : 0.10 (
DistinguishedName               : CN=ecp (Default Web Site),CN=HTTP,CN=Protocols,CN=SHC-CAS,CN=Servers,CN=Exchange Admi
                                  nistrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=SchoolHealth,CN=Micros
                                  oft Exchange,CN=Services,CN=Configuration,DC=schoolhealth,DC=com
Identity                        : SHC-CAS\ecp (Default Web Site)
Guid                            : 0ef50f0b-0e06-4030-bd9a-55af2b8e29c2
ObjectCategory                  :
ObjectClass                     : {top, msExchVirtualDirectory, msExchECPVirtualDirectory}
WhenChanged                     : 3/27/2012 1:04:05 PM
WhenCreated                     : 3/23/2012 8:17:55 AM
WhenChangedUTC                  : 3/27/2012 6:04:05 PM
WhenCreatedUTC                  : 3/23/2012 1:17:55 PM
OrganizationId                  :
OriginatingServer               :
IsValid                         : True

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

HornAlumAuthor Commented:
if i run the Discover-EcpVirtualDirectoryForEmc at the shell, i get this (you see the point of error marked by the "<<<<" in the "if" command

HornAlumAuthor Commented:
I'll try this, thanks!
HornAlumAuthor Commented:
ok so if i understand this code right, it pulls up the local site, based off of AD. in the code below, you'll see that we have the same SiteLinks in our local site

Local Site
So, it tries to compile a list of sites based off of site links.

The code fails right away, with the Null array. The "for" loop takes the first SiteLink in $localSite and assigns it to $siteLink.

I decided to try and just display the $siteLink. My default siteLink seems to have no "Sites" in it. That makes sense because if there's no Sites within the SiteLink, then trying to pull up Sites[0] (the first entry in the array), it's going to come up NULL

So ... maybe I have an issue with Sites? I see the DefaultIPSiteLink under IP in Inter-Site Transports within AD S&S. It has 3 sites listed in there, so i don't understand why the code returns that there are no sites within the Site Link
HornAlumAuthor Commented:
Actually, I just noticed this uses the Rpc Transport type and I don't have the RPC Transport type in AD S&S. Only IP and SMTP.
HornAlumAuthor Commented:
Ok seems like I just fixed this. We added a site 2 months before the exchange upgrade. Somehow, a conflict site was created. I ended up deleting that CNF site once i realized it was safe to do so.

I went back to the Exchange server and ran these commands again

$site = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite()

This time, I ended up seeing the sites listed

Appreciate the help!
HornAlumAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 500 points for sirakov's comment #a38430355
Assisted answer: 0 points for HornAlum's comment #a38433051

for the following reason:

Parsed the code to find that there was a site issue, which by removing conflicting sites, solved the issue
Glad you figured it out!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.