Stopped-extension-dll-exceptions in User Profile Sync

February 4 2013 155 comments

Symptons: You get stopped-extension-dll-exceptions in MIIS client while running full or incremental user profile sync.
MIIS Client

At the same time you will get following exceptions in Application log:
Application Log

Fix: This problem arises from user profiles that have URL in PictureURL field, but the picture is not accessible. You can fix this issue by running the following PS script. The script loops through every user profile and makes a HTTP request to the picture URL. If the URL cannot be accessed the script clears PictureURL field.

# Get user profile service
$UserProfileService = @(Get-SPServiceApplication | ? { $_.TypeName -eq "User Profile Service Application" })[0]

if($UserProfileService)
{
    $serviceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($UserProfileService.ServiceApplicationProxyGroup, [Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default);
    $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)

    # Get all profiles
    $allProfiles = $profileManager.GetEnumerator();

    $counter = 0;
    $decCounter = 0;

    # Loop through every profile
    foreach($profile in $allProfiles)
    {
        $counter++;
        $decCounter++;

        $url = $Profile['PictureURL'] -as [string];

        if($url)
        {
            # Create HTTP Request
            $req = [system.Net.WebRequest]::Create($url)
            $req.UseDefaultCredentials = $true
            try {
                $res = $req.GetResponse()
            }
            catch [System.Net.WebException] {
                $res = $_.Exception.Response
            }

            $int = [int]$res.StatusCode
            $status = $res.StatusCode

            # If the image cannot be accessed clear the field
            if($int -gt 400)
            {
                Write-Host -NoNewLine $Profile['PreferredName'] "profile picture broken "
                $Profile['PictureURL'].Value = $null;
                $Profile.Commit();
                Write-Host -ForegroundColor Green "[FIXED]";
            }
        }

        if($deccounter -eq 10)
        {
            Write-Host $counter" user profile checked";
            $decCounter=0;
        }
    }
}

After running this script the User Profile Sync started to work immediately.

Popularity: 5% [?]

155 comments to “Stopped-extension-dll-exceptions in User Profile Sync”

  1. Uh oh, sounds like User Profile Sync is having some trouble! This “stopped-extension-dll-exception” error can prevent user profiles from syncing properly. Here’s hoping it’s an easy fix!

  2. Katja says:

    This website was… how do I say it? Relevant!! Finally I’ve found something which helped me.
    Appreciate it!

  3. Billy says:

    Our Plaster repair team encountered this problem and i’m glad to see that there’s an easy solution available. Big thanks!

  4. John dore says:

    It seems like this topic has sparked a lot of discussion and debate. It’s always interesting to see how technical issues like ‘Stopped-extension-dll-exceptions in User Profile Sync’ can generate so much attention. Hopefully, there are some helpful insights and solutions in the thread.

  5. If you’re still experiencing issues after trying these solutions, consider seeking assistance from Microsoft support or consulting online forums for further troubleshooting.

Leave a Reply