Stopped-extension-dll-exceptions in User Profile Sync

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

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

  1. website says:

    Thanks for sharing here an informative post.

  2. Good and helpful. Just what I needed

  3. Are you a kind of bloggers who have been experiencing negative
    results of Ad Blockers? In fact, ad blockers do not acknowledge them,
    there are nothing types of fishy. So, audiences do not react properly to advertisements and ad blockers
    are not good on your pockets. However, those days are
    gone and we are able to have few excellent running a
    blog platforms, which may fulfill the wishes of both the readers as nicely because the bloggers.
    FTC, nonetheless, guided bloggers to mention ‘native ad’
    at the top of the post to inform readers that they will learn an advert.

    Read all the time. In the event you should not have
    one, it’s the time to get it. If your audiences do not get a fantastic expertise at your
    site, they are going to transfer to the one right subsequent to you.
    Organizations that select to outsource to this country will notice
    that one can discover quite just a few corporations that offer writing outsource services and products at bills
    that are some of the lowest on the earth. In case your work
    is not intensive like video processing or graphics, you may settle for a 15″ or 17″ laptop computer
    or opt for a small 10″ netbook. If Apple is your excellent model, we might recommend MacBook Pro 13″.
    Just remember to remain inside your price range.

  4. This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here!

Leave a Reply