Stopped-extension-dll-exceptions in User Profile Sync

February 4 2013 110 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% [?]

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

  1. Howard S. Loose says:

    One of the fundamental focuses of Site improvement is to develop traffic to your website page. There are various ways to deal with doing this, for example, driving your site for unequivocal articulations, and making top notch fulfilled. By stretching out traffic to your site, you can guarantee that more potential clients will see your things and associations. This can incite more plans and more business progression. Check for more Wpgio It Solutions

  2. Domeng says:

    Just in time! This resources is what I am needing right now. Thank you for sharing. Coquitlam Window Cleaners

  3. Mary Z. Samaniego says:

    Adding certifications to your LinkedIn profile is a great way to show potential employers that you have the skills and knowledge they are looking for. In this step-by-step guide, we will walk you through how to add certifications on LinkedIn. Check for more Wpgio It Solutions

  4. Aeron says:

    Thanks, You’ve got one of a kind creative ability and have come up with a few of the foremost inventive thoughts. Insulation Pros of Coquitlam

  5. Ellen S. Holland says:

    Envision what’s going on where someone needs to pick after the deadline. When in doubt, we can oblige late choices with an additional rush charge. Expecting no one really minds, talk with your serious event facilitator with any late people. see here

  6. Raizen says:

    Glad I came here! Thanks for updating this article. Thanks! Concrete Services

  7. Piiper says:

    Your site is so good and informative thanks for sharing this post! Piiper Digital Solutions Sherwood Park AB

  8. Venice says:

    Thanks, You’ve got one of a kind creative ability and have come up with a few of the foremost inventive thoughts. click here

  9. Ellen S. Holland says:

    We have a 10-15 man least, contingent upon the class. go to website

  10. Yusuf Suhaib says:

    You have presented a compelling case. The information was really useful in clarifying the procedure for me. I found it quite moving. This is a great deal of helpful data, so please accept my gratitude. Here’s a link to a website
    Islami lecture

Leave a Reply