Stopped-extension-dll-exceptions in User Profile Sync

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

30 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:

    Hi,
    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 ?
    Thanks

  13. greenali.com 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:

    Hi,
    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.

  28. site says:

    Thanks for sharing the fix on this issue.

  29. web store says:

    How to Use Google Chrome Like a Pro
    Are you still using Internet Explorer? Wow I sure hope not.
    But if you are, take time today to remodel your web browsing experience and skills by installing Google Chrome.
    Chrome will be the fastest as well as internet browser on earth (within my humble opinion).
    There are just actions with Chrome that you just no longer can do with some other internet browser.
    In this article I will focus on the way you
    use Google Chrome by leveraging Chrome shortcuts and also the Google Chrome Webstore.

    Leveraging keyboard shortcuts is among the most 1 activity you’re able to do in order to save time using the Internet.
    Most people rarely use Chrome shortcuts. Think about this, each time you grab the mouse you lose a few seconds.
    Over time if you add those seconds up over several years that happens to be lots of
    time. I not acquiring in to the fine specifics of specific shortcuts.
    Just Google “Chrome shortcuts” and learn them. Print off of the Chrome shortcuts cheat sheet and hang
    up it over your desk. Learn to love Google Chrome keyboard shortcuts and
    I promise you will improve your productivity.

    Have you been aware of the Google Chrome Webstore?
    The Chrome Webstore is basically an app store to your browser!

    What is awesome about Chrome is that you can add apps into it to improve and customize your web store browser.
    Sometimes these Chrome apps can also be known as extensions.
    For example you can contribute basic apps like Facebook and YouTube then when you open up a brand new tab (using keyboard shortcuts of
    course) you will find there’s Windows-like web browsing interface.
    Think of them like huge bookmarks which you can access instantly every time you
    open a brand new tab.
    More advanced Google Chrome Webstore extensions can be hugely valuable too.

    I love SEO for Chrome by . This extension allows me to ascertain site traffic,
    amount of Facebook likes, and quantity of links
    for ANY of my competitors or potential partners. Another great extension is the
    Google Mail Checker. This extension allows me to add a
    smaller icon to my browser that alerts me each time I get a message.
    With one easy click I can immediately head to my Gmail.

    AddThis is a terrific marketing app on the Chrome Webstore.
    It allows you to share any link through literally any network instantly.
    You can get a new extension to ensure that with one click you’ll be able to
    share interesting sites or content. You can share links
    on Facebook, Twitter, and LinkedIn for example.
    The list of options and networks that AddThis supports is massive so check
    it and personalize it for yourself.
    The number of hours an average joe spends online is growing in an exponential
    rate. Everyone irrespective of their profession needs to enhance their web
    browsing skills and knowledge. The great thing about shortcuts along with the webstore is that now you may immediately increase their skills and experience by
    learning them. I feel the simplest way to learn is through video and has a great course on Google Chrome it is possible to check out
    if you want step-by-step training and instruction. Take some time through your busy day and dedicate yourself to learning the shortcuts
    and leveraging the apps Google Chrome provides.

Leave a Reply