Stopped-extension-dll-exceptions in User Profile Sync

February 4 2013 28 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]

    $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)

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

            # 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;
                Write-Host -ForegroundColor Green "[FIXED]";

        if($deccounter -eq 10)
            Write-Host $counter" user profile checked";

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

Popularity: 4% [?]

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

  1. Dave says:

    Ty Ty Ty, spot on. I have been trying to figure that damn thing out for weeks.

  2. Eric says:

    Thanks very much Marko. I got these errrors after a MySite WebApplication name change, and it solved the problem.

  3. You need to take component in a contest for among the most desirable blogs on the internet. I will suggest this website!

    christian louboutin outlets

  4. Barbaros says:

    After Web app restore, problem has started. This helped a lot, thank you very much!!

  5. GTA V Pics says:

    omg, thank you very much for posting this! Grand Theft Auto V looks Wonderful! Is everyone going to wait to play online until after they finish the story? Or are you gonna rip into it and not even bother?

  6. I must thank you for the efforts you have put in writing this
    website. I’m hoping to see the same high-grade blog posts from you later on as well.
    In truth, your creative writing abilities has encouraged me to get my
    own site now ;)

  7. John Chapman says:

    Thanks for posting this. I was receiving “More than one DN specified for the same profile” exceptions, and this (though not seemingly related) resolved it.

  8. Allison says:

    Seems to be fixing my pictures , reporting every 10 checked, but occasionally throwing this error. SP 2010 farm.

    Exception setting “UseDefaultCredentials”: “This property is not supported by this class.”

    Any insight?

  9. Yasir Ahmed says:

    Thanks, this worked for me.

  10. Sören says:

    Thanx very mutch for this helpful hint and the description to figure out and fixing this problem !

  11. Tonia says:

    Everything is very open with a very clear description of the issues.

    It was truly informative. Your website is useful.
    Thanks for sharing!

  12. P33838 says:

    Trying to amend your script to output to a file so that I do not commit any changes until I know how many profiles have the issue but not having any luck. Can you please let me know what I would need to amend to output to a file ?

  13. says:

    Yup, you are exactly Google namely the best for blogging, Google weblog too come fast within quest engines too.

  14. Kyle says:

    The Script fixed my error in the FIM, but i am still not getting my pictures to load from AD. They have copied to SP in a library, but are not showing in the People Directory. How do I fix that?

  15. I am really acute of seeing humorous movies at youtube, and this videos namely really so comical, hehehhe.

  16. Downloading material from this website namely for effortlesswebsites which transfer me here and there aboard the internet pages.

  17. Alex says:

    Hi, i still have kindof the same problem but it is not 404 is 401 and i made all i know to find the problem and still nothing.

    The log is like:

    “System.Net.WebException: The remote server returned an error: (401) Unauthorized.
    at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
    at System.Net.WebClient.DownloadData(Uri address)
    at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.DownloadPictures(ProfileChangeData[] profiles, Boolean delayErrors)
    at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.Microsoft.MetadirectoryServices.IMAExtensibleFileImport.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData)
    Forefront Identity Manager 4.0.2450.51″

  18. Love the website– extremely user friendly and lots to see!|

  19. Capurnicus says:

    Ran it with SharePoint 2010 Management Shell (Admin), and it worked like a charm! Thanks!

  20. Sujith Priyankara says:

    still same error… please help

  21. vas says:

    Easiest way o solve this problem is you could delete the synchronization connection, and recreate another. But before doing so take note of all managed properties because this will be deleted as well.
    The thing is that i do not want the existing pictures to be deleted. Also, this keeps happening when someone uploads new picture and there is already picture in the AD. Is there any solution to update without error and keep all images as well?

  22. I’m glad I came across this site; very informative post.

  23. click says:

    Thanks for bringing this one up. I have been looking for this. :)

  24. Elana says:

    Having read this I thought it was extremely informative.
    I appreciate you taking the time and energy
    to put this article together. I once again find myself spending
    a significant amount of time both reading and commenting.
    But so what, it was still worthwhile!

  25. Gwendolyn says:

    Hi there colleagues, pleasant paragraph and nice urging commented here,
    I am in fact enjoying by these.

  26. Thanks for posting this useful information, I appreciate your effort on this article.

  27. Hi everyone, it’s my first go to see at this web page, and paragraph is truly fruitful
    for me, keep up posting these posts.

Leave a Reply