Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 16321
  • Last Modified:

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

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
Jono Martin
Asked:
Jono Martin
  • 17
  • 13
3 Solutions
 
Justin SmithSr. System EngineerCommented:
0
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Justin SmithSr. System EngineerCommented:
What template does this site use?  Is publishing turned on?
0
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
Is the farm admin account a local admin on the box?
0
 
Jono MartinSystems AdministratorAuthor Commented:
No, it's a domain admin account.
0
 
Justin SmithSr. System EngineerCommented:
So it's not in the local admin group?
0
 
Jono MartinSystems AdministratorAuthor Commented:
It's a member of the Domain Admins group with is a member of the local admins group.
0
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
dmogheCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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
 
Jono MartinSystems AdministratorAuthor Commented:
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 17
  • 13
Tackle projects and never again get stuck behind a technical roadblock.
Join Now