How to: Troubleshoot “Server Error in ‘/’ Application.” error after SP2010 SP1 update

In case you just installed SharePoint 2010 Service Pack 1, or one of the new August/September 2011 updates is giving you a hard time, if you’re facing the following error:

“Server Error in ‘/’ Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties() +134
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionIDs() +44
Microsoft.Office.Server.Administration.UserProfileApplicationProxy.IsAvailable(SPServiceContext serviceContext) +329
Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalAvailable() +44
Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls() +60
Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable() +15
Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +65
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427”

You might be able to solve the error by simply deleting your User Profile Service Application.

Indeed, this is not best practice obviously, but if you need to get back to working fast, this is a quick solution (hence, this is a  “Quick tip” post).

In order to delete the Service, you need to visit the Central Administration of your SP2010 installation, at the page where the listing of your Service Applications resides (Central Administration > Application Management > Manage Service Applications)

ie. /_admin/ServiceApplications.aspx

Click next to the User Profiles Service Application (NOT on it) and then, from the ribbon options, select Delete.

As I said before, this is hardly best practice but, still, it will help you get back to work until a more suitable solution comes around.

Update: You will see in the comments that Tobias Karlsson proposed a console command to solve this issue. I tried it and it does work. Depending on whether you’re comfortable with running a full fledged farm upgrade, you might want to try this:

PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

As I said already, it did work for me. Thanks Tobias.

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

24 thoughts on “How to: Troubleshoot “Server Error in ‘/’ Application.” error after SP2010 SP1 update

  1. Hello again!

    It’s been awhile since I posted that command line, so you may have figured this out already, but just in case 🙂

    The actual installation of the service pack, or any CU, will only update parts of your farm, leaving the databases and binaries out of sync. This is done on purpose, in order to minimize downtime by allowing things to run on different versions for a bit, but it’s not recommended to leave it in this state for more than a few days.

    The psconfig upgrade command will upgrade the databases and get everything up to speed nicely (the b2b option means build-to-build, an update, while v2v is version to version, MOSS to SP2010). Great for installing the updates during the workday and applying it to the databases during the evening or weekend.

    So, you need to run that commandline any time you update your SharePoint environment, or you’ll eventually run into problems like the one above 🙂

    Cheers,
    Tobias

  2. You could also try “PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures” without the quotes of course. The health analyzer in central admin will usually tell you if you need to perform an upgrade or installation.

    • MGR

      Thanks for that Tobias.
      It certainly did work.

  3. Lars

    Hi MGR,
    I’m having the same problem as you had, but in my case when I click on User Profiles Service Application, the “Delete” button is not enabled :(. Do you know why?

    Thanks,

    • MGR

      I can’t imagine why you would be able to see the services but not delete one. In any case, you can delete a running service through stsadm. You need to run: “STSADM -o deleteconfigurationobject -id {ID}” (without the quotes). Just replace the “{ID}” part with the ID of your User Profile Service. You can find the ID just by clicking on the name of the service and then checking the URL that will be displayed once you have navigated to the specific service that you want to delete. For example, URL: “http://gbsunw11b:8080/_admin/sssvc/ManageSSSvcApplication.aspx?AppId=1458fc56-aa96-4e8d-b70d-7b20f5e80315” you can get the ID after the “AppId=”.
      Sorry for the late reply, it’s been hectic around here lately.

  4. Steve

    Thanks! Your solution worked!

  5. Marcin

    thanks!

  6. Victor Shostak

    Worked indeed. Interesting, it worked for some time before it broke but fix restored it, thanks.

  7. ayman massoud

    thank u MGR , actually you dont need to delete the User Profile service , all you need to do is stop user profile services and user profile services synch from /_admin/Server.aspx and start it again , and check the user profile services application pool is up and running .:)

    • MGR

      That’s great news Ayman,
      Thank you for sharing that. As I said, I was so pressed for time that I didn’t really give it much thought. I deleted the service and then recreated it. It didn’t work, so I deleted it again. After it worked, I never went back. I’m actually coding against SP2007 again, and that leaves me little time to troubleshoot SP2010. I’ll do as you proposed and hopefully it will work for me and for all the others as well.
      Cheers mate!

  8. Ed

    Is there any press release from microsoft about this problem? We have encountered the same problem on our Sharepoint 2010. Is there any “Recommended” way on how to solve this problem?

    • MGR

      There wasn’t one till late last week. I’ve been out of office the last few days so I haven’t kept up with developments really. If I get any more updates I’ll be sure to post them.

  9. Carlos

    Thank you!!!!

    • MGR

      Glad it helped!

    • srikanth

      Thank u so much,.,.

  10. Marri Srikanth

    Hi,
    Thanks a lot, My problem was resolved after deleting the User Profiles Service Application.
    Could you please let me know why should we delete this service and what is the root cause of this issue.

    • MGR

      Hi,
      as I said, this is not a proper solution but I had to get back to developing quickly so I didn’t quite bother with best practices and stuff.
      The root cause seems to be one of the August/September updates from MS. I can’t be sure of which one cause I was away, working on a 2007 environment most of that period and all of the 2010 updates installed at once when I turned on my 2010 machine.
      The reason why to delete the service is because it obviously goes bananas. In the error message it points to this at: “Microsoft.Office.Server.Administration.UserProfileApplicationProxy”
      I’m afraid I don’t have any more details on this issue. I was away again and just got back. If however I do get an update or more details, I’ll be sure to post them.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.