Error related to publishing a page

Oct 26, 2009 at 6:58 AM

 whenever i create an page using SiteAction->creating publishingpage , page is created but when i publish that page it gives me following error

Server Error in '/' Application.

Object reference not set to an instance of an object.

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

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   CompleteSharepoint.NET.Repositories.DefaultSiteRepository.SetPageDetails(SPWeb parentWeb, SPListItem page, PublishingPageEntity& publishingPage) +1706
   CompleteSharepoint.NET.Repositories.DefaultSiteRepository.GetPublishingPage(String absoluteUrl, Boolean defaultPage) +606
   CompleteSharepoint.NET.Core.DefaultSiteController.GetPublishingPage(String absoluteUrl, Boolean defaultPage) +81
   CompleteSharepoint.NET.Core.DefaultSiteController.GetPublishingPage(String absoluteUrl) +45
   CompleteSharepoint.NET.Services.DefaultSiteService.PublishingPageExists(String absolutePath) +53
   CompleteSharepoint.NET.Web.PublishingPagePathProvider.FileExists(String virtualPath) +111
   System.Web.Hosting.VirtualPathProvider.FileExists(VirtualPath virtualPath) +23
   System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) +24
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +113
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

I made all the changes in web.config which are mention in developer's guide.

Coordinator
Oct 26, 2009 at 7:08 AM

Mahima,

Can you please try to re-create the site collection? Sometimes Sharepoint has a but that then corrupts the content types.

 

Cheers,
Tommy

Oct 26, 2009 at 7:42 AM

Hi Tommy ,

                 i deleted that site and recreate it .. but shows me the same error ..

Oct 26, 2009 at 8:59 AM

 Thanks ..... error is resolved ...... its like to publish a newly created page we have to go like Site Actions -> Edit Page first before publishing it from anywhere ....