Getting null reference exception when try to open list settings (Listedit.aspx) for Sharepoint 2010

This is a typical  error scenario that you have if you move or copy some sharepoint core dll’s which is referenced fr0m another folder.There is common mistake when developing custom applications that moving and copying sharepoint core dll’s to where is not in original folder (for example coping Microsoft.Sharepoint.dll to BIN folder of web application)  or unnecesserly register in GAC (for example registering Microsoft.Sharepoint.ApplicationPages.dll to GAC).

Why is this dangerous ? i can simply say when you upgrade or install any patch on sharepoint , the copied dlls form original location  can not be upgraded  by default .So this cause a huge anomality in your system. DLL version integrity is very important issue for every Microsoft product. So be careful for this operations , after all if you still need to copy or move operation, that upgrading copied dlls is your responsibility.

So lets keep going with our error :

when you click the one of list’s list settings (listedit.aspx) you can probably getting fallowing error in application event logs:

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

Stack trace:    at Microsoft.SharePoint.ApplicationPages.ListEditPage.SetSectionLinks()
at Microsoft.SharePoint.ApplicationPages.ListEditPage.OnLoad(EventArgs e)
at ASP._layouts_listedit_aspx.OnLoad(EventArgs e) in c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\listedit.aspx:line 25
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

And if you enable custom errors from  in your web.config which is in Layouts folder.You can see the error in browser:

NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.SharePoint.ApplicationPages.ListEditPage.SetSectionLinks() +426
Microsoft.SharePoint.ApplicationPages.ListEditPage.OnLoad(EventArgs e) +896
ASP._layouts_listedit_aspx.OnLoad(EventArgs e) +290
System.Web.UI.Control.LoadRecursive() +65
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427

For resolving this issue you should find the related copied assembly files which according this scenario is Microsoft.Sharepoint.ApplicationPages.dll in use for unfamiliar locations.

the orginal location for this dll is  Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\BIN

1) First Check the GAC this dll should not be added to GAC if it is upgrade latest correct version or delete the dll.
2) Check other possible existance may it be used in BIN folders of web applications. For getting all list of any dll location you can use this script:
https://blog.bugrapostaci.com/2011/12/26/powershell-find-files-with-versions/ this powershell command gives you a list that defined dll locations and versions.

For best practise if you need any reference to Sharepoint DLL’s use and reference them in original locations .if not you always remember to upgrade latest versions where it have been that is your resposibility.

See you next time.

 

 

 

 

 

 

Powershell find files with versions.

If you are searching all same files and versions in your drive you can user fallowing powershell command:

get-childitem -Recurse | where-object { $_.Name -eq “Microsoft.Sharepoint.ApplicationPages.dll” } |%{ $_.VersionInfo }| select * > c:\FileVersions.txt

Sharepoint 2010 DistributedCOM error in system event logs.

If you getting DistributedCOM errors like:


The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{61738644-F196-11D0-9953-00C04FD919C1} and APPID
{61738644-F196-11D0-9953-00C04FD919C1} to the user <DOMAIN\user> SID (<ID>) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.

For solution:
http://social.msdn.microsoft.com/Forums/da-DK/tfsadmin/thread/883b5f1c-1718-4b9a-a6c8-bf32c5d4d6d2

 

 

Does Sharepoint 2010 support classic-mode for application pool ?

The Answer is No.
If you set your sharepoint web application’s application pool mode as classic mode you get the fallowing error :
“This operation requires IIS integrated pipeline mode.”

For more information about Sharepoint 2010 Architecture please read fallowing article :
http://msdn.microsoft.com/en-us/library/gg552610.aspx

For more information about Integrated-Pipeline:
http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis/

Sharepoint 2007 “Mainstream Support” ends in April 2012

Microsoft has released the third service pack for Office 2007 and Sharepoint 2007 SP3  this is the final packs for both Office 2007 and SharePoint 2007. Both products are scheduled to lose “mainstream support” in April 2012. During the mainstream support period, users have access to free product support as well as security and non-security updates.

After mainstream support ends next April, Office 2007 and SharePoint 2007 will enter a five-year period of “extended support,” during which users can still receive security updates.

Is your SharePoint 2007 farm already on Service Pack 2? If not, read this:
http://blogs.technet.com/b/stefan_gossner/archive/2010/01/07/is-your-sharepoint-2007-farm-already-on-service-pack-2-if-not-read-this.aspx