Solved

SharePoint 2010 "Object reference not set to an instance of an object."

Posted on 2012-03-23
31
15,750 Views
Last Modified: 2012-06-21
I am getting the following error when trying to access our only SharePoint site:

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

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

We are using SharePoint 2010 (basically out of the box) on Server 2008 R2.

I can get to the SharePoint Central Admin site ok.  I have done an IISRESET and I've restarted the site.  Any ideas of what to check next?

Thanks,
Jono
0
Comment
Question by:Jono Martin
  • 17
  • 13
31 Comments
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
Sometimes there can be an issue with a web part or something on the page that throws the error, rather than an issue with the entire site or app.
0
 

Author Comment

by:Jono Martin
Comment Utility
ACH1LLES - Thanks for the quick reply.  I can get to the URL you asked about.  I can also get to other sites by entering the specific URL, except the Home page.  In all of these examples, the navigation bar gives me an error, but other things seem to work OK.  Also, I can navigate the database through Windows Explorer.

Can you give me something to look for regarding the home page and the navigation bar?  All was working well until this morning when it started throwing this error out.

One more thing that may be useful: When connecting from the outside the network—using a different URL—the authentication dialog pops up before it gives me the error (from inside the network, it uses the domain credentials).  This, along with the Windows Explorer success means that the database is OK, right?

Thanks again for your help.
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
What template does this site use?  Is publishing turned on?
0
 

Author Comment

by:Jono Martin
Comment Utility
I hate to sound like I have no clue about these things, but I'm not very familiar with SharePoint.

I spoke to the person who set it up more than 1½ years ago.  He doesn't know a lot about it either, but he said he started with a team template and made modifications along the way.  Regarding publishing, he's pretty sure he turned that on at some point, but we're not 100% on that.

Can you tell me how to find that information?
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
Ok.

I'm assuming this is SharePoint Server 2010?

If you go into Central Admin, Application management, Manage Service Applications.....can you click on the User PRofile Service to access the admin page?

By the way, if you ever need remote assistance, I"m available.  My email address is in my profile.
0
 

Author Comment

by:Jono Martin
Comment Utility
When I go there, I get to
Central Administration > Manage Profile Service: User Profile Service Application

On that page I have this line in red:
"This User Profile Application's connection is currently not available. The Application Pool or User Profile Service may not have been started. Please contact your administrator."

This is followed by a bunch of links in the following 4 categories:
People, Synchronization, Organizations, My Site Settings
0
 
LVL 38

Accepted Solution

by:
Justin Smith earned 450 total points
Comment Utility
That is the issue.  Since your UP service isn't running, some web parts on your home pages are choking out.

In Central Admin, go to System Settings - Services On Server.  See if both the User Profile Service and USer Profile Sync Service are started on your sync server.
0
 

Author Comment

by:Jono Martin
Comment Utility
I went to Services on Server and I saw that the User Profile Service was Started, but the User Profile Sync Service was Stopped.  I click Start a while ago and it's been on Starting ever since.  I did an IISRESET on the server and then refreshed the Services on Server page; still says Starting.
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
Is the farm admin account a local admin on the box?
0
 

Author Comment

by:Jono Martin
Comment Utility
No, it's a domain admin account.
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
So it's not in the local admin group?
0
 

Author Comment

by:Jono Martin
Comment Utility
It's a member of the Domain Admins group with is a member of the local admins group.
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
Ok.  I would review this write up:  http://www.harbar.net/articles/sp2010ups2.aspx

Bottomline, the Sync service seems to be the source of the issue.
0
 

Author Comment

by:Jono Martin
Comment Utility
OK, I now have the User Profile Synchronization Service started, but the "Object Reference not set" error remains.

What else can I check?

In the server application logs, I see SharePoint Foundation (ID 8306) error repeatedly saying "An exception occurred when trying to issue security token."

I also saw Forefront Identity Manager (ID 3) stating that the "HostId is not registered", and ILM Web Service Config (ID 234) Warning saying that the "ILM Certificate could not be created."

Do these errors say anything to you about this issue?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
So you can now access the UPS admin page?  Can you click User Properties?

DId all this happen out of the blue?  Or did you recently install updates?  Have you rebooted?
0
 

Author Comment

by:Jono Martin
Comment Utility
I still get the red line stating "This User Profile Application's connection is currently not available. The Application Pool or User Profile Service may not have been started. Please contact your administrator."

I rechecked the User Profile Service and the User Profile Sync Service and they both say Started.

This happened right after updating the SSL cert, but the site is not setup for SSL; it's running on port 80.  We've included this site (or the external URL for it) so that we can go to SSL in the future.

I have not rebooted the server; I restarted IIS and the site in IIS several times by now.

Do you think the SSL cert is affecting the site even though it's not using SSL?
0
 

Author Comment

by:Jono Martin
Comment Utility
My time is up here.  Though I may be able to check on updates, I'll not be available to do any testing or troubleshooting again until Monday morning (ET).

Thanks for your continued assistance.
0
 
LVL 5

Assisted Solution

by:dmoghe
dmoghe earned 50 total points
Comment Utility
Have you tried to remove the association of UPA from the proxy group from entral Admin | Application Management | Configure Service Application Associations and clicking the default Application Proxy Group and uncheck UPA.

I am sure you would be able to browse to the site. If yes, try creating another UPA proxy and check by associating it.

Ensure that FIM services are started in the services.msc and UPA sync service are also started.
0
 

Author Comment

by:Jono Martin
Comment Utility
dmoghe - The Forefront Identity Manager Service and the Forefront Identity Manager Sync Service were both set to Disabled.  I set them to Manual and started them to no avail.

When you say to remove the UPA association, do you mean the User Profile Service Application?  I'm not sure how to do that as the association checkboxes are grayed out.  In order to do that, do I need to change from Default to Custom first?

Having had the weekend to think about this, it seems like more than a coincidence that this happened right after updating the SSL cert, even though SP is on http, not https.

Can someone give me something to check or try relating to that?  Is there an easy way to "turn off" the SSL cert as a test?

We have been without SP now since Friday morning.  Thanks again to anyone for assistance.

Jono
0
 

Author Comment

by:Jono Martin
Comment Utility
dmoghe - I figured out that I'd clicked on the wrong thing in Service Application Associations.  Once I clicked on "default" rather than the web application name, I got the checkboxes.  I unchecked User Profile Service Application and then SP worked again.

My question now is: What is the User Profile Service Application and what am I now losing by unchecking it?

Thanks,
Jono
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
You lose user profile information access from that web application and any web application that is subscribed to the Default group.  When you click on a users name on the site, you won't go to their profile page.  You also lose MySite capability.
0
 

Author Comment

by:Jono Martin
Comment Utility
I saw on MS site what that service is.  We need to have what User Profile Service Application offers.  How do I get that back without losing the site again?
0
 

Author Comment

by:Jono Martin
Comment Utility
Also, the Forefront ID Manager Service and the Forefront ID Manager Sync Service were Disabled before I set them to Manual and started them.  Should they be started?  What should be the status and startup type for these 2 services?
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
You should NOT be messing with these two services in services.msc.  You should only interact with them through SharePoint.

You need to put them back to Disabled and running as Local System.  Then, through Central Admin, you start the User Profile Sync Service.  This should change their start up to Auto, and change the account to the farm account.  

However, when I told you to do this earlier, you said that the services started but when you went to the Uuser Profile admin page you got red text that said something wasn't available.  Is this still corrrect?
0
 

Author Comment

by:Jono Martin
Comment Utility
That was correct at the time, but now we're back to it being stuck on Starting.  I'm trying to read through that document you sent me (http://www.harbar.net/articles/sp2010ups2.aspx), but I'm having a hard time with a couple of things.  Where can I see what the Farm account is?  According to the document, the UP Sync service must run using the Farm account.  But it was running prior to the SSL cert update.

How can I find out what account the UP Sync service is using?  In Services.msc on the server, I see the UP service—it's using the Local System account—but I don't see the UP Sync Service there.  On the Services on Server in Central Admin, it doesn't show what account is being used by each service.
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
Typically its the account that is running the SharePoint Timer Service on your servers.  Go look in services.msc to see.

When you start the UPS, you are prompted to enter a password.  It should be the account running the timer service that you are prompted for.

This is the same account that will eventually get set to run the two ForeFront services, once the Sync service starts from Central Admin.
0
 

Assisted Solution

by:Jono Martin
Jono Martin earned 0 total points
Comment Utility
OK.  The SharePoint 2010 Timer service is using the domain admin account I mentioned before.  The two forefront services are set to local system account.  is that OK?

I'm not sure if this will clarify anything or just muddy the waters even more, but the application log was filled with this error several times per minute: System.ServiceModel 3.0.0.0 (ID 3).  I did a search on that error and found that you should only have 1 https binding on a site in IIS.  The SharePoint Web Services site had 2 https bindings on 2 different ports.  I removed one (I tried to make an educated guess which one to remove) and then the site went back to normal.

Now the UP Sync Service says Started, no more red line on the Manage Profile Service: User Profile Service Application page, the User Profile Service Application is checked, and all seems OK.

Do you see any red flags or any other possible issues?

Thanks,
Jono
0
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
My comment from above:  "through Central Admin, you start the User Profile Sync Service.  This should change their start up to Auto, and change the account to the farm account.  "

Normally I wouldn't advise playing around with the SharePoint Web Services site.  If the Sync service is started, you don't have any red text on the admin page, and the two ForeFront services are started and running as the domain account.....I guess you're good to go.
0
 

Author Comment

by:Jono Martin
Comment Utility
Thanks ACH1LLES.  All of those things are true.  It must have been that when I updated the SSL cert, it added (or I added without realizing it) another https binding on the SP Web Services site in IIS.

Thanks again for all your help; I have a happy userbase now.

Points coming next.

Jono
0
 

Author Closing Comment

by:Jono Martin
Comment Utility
The main issue was the multiple https bindings on the SP Web Services site in IIS, but I wouldn't have gotten there without the other selected solutions.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now