ContentNotFoundException: Content with id 5 was not found

Vote:
 

Hi guys. This is one topic that has been mention a few times before, but unfortunaltely all the suggested fixes have not worked for me. I have used couple of days to debug without success and if I am not able to fix it soon I am really considering to start completly new site and build it from scratch. Hopefully somebody had the same problem and solved it.

I am developing a prototype of a new EPiServer website and publish it to a different ISS. The site is MVC and has latest build version 10.0.1.0 of EPiServer.

While I am developing everything works fine, and I have checked my code, there is no ContentReference to an item with the id of "5" anywhere in the routing or cshtml files. 

I have recently added plane old indexing service (Not Find) to the site also. It might be realated but I am not sure. 

Problem is that I cannot start the site. Right after I open it I get the error massage.

Server Error in '/' Application.

Content with id 5 was not found

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: EPiServer.Core.ContentNotFoundException: Content with id 5 was not found

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: 


[ContentNotFoundException: Content with id 5 was not found]
   EPiServer.Core.Internal.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +622
   EPiServer.Web.Routing.Segments.Internal.NodeSegment.RouteDataMatch(SegmentContext context) +402
   System.Linq.Enumerable.All(IEnumerable`1 source, Func`2 predicate) +163
   EPiServer.Web.Routing.Internal.DefaultContentRoute.RouteSegmentContext(SegmentContext segmentContext) +16
   EPiServer.Web.Routing.Internal.DefaultContentRoute.GetRouteData(HttpContextBase httpContext) +495
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +231
   EPiServer.Web.Routing.RouteCollectionExtensions.HandleRouteData(RouteCollection routes, HttpContextBase context) +31
   EPiServer.Global.DefaultDocumentHandling(Object sender, EventArgs e) +181
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

 

I have tried to use the trick http://mysite/utils/login.aspx to login in and open /EpiServer/CMS but then I get popup every second saying:

Something went wrong.  Failed loading content with the url/uri: epi.cms.contentdata:///5

Also tried to attach the VS debugger but there is no way to break at the exception. I am just able to see that exception is thrown even though I had all exceptions breaks turned on. 

Exception thrown: 'EPiServer.Core.ContentNotFoundException' in EPiServer.dll
Exception thrown: 'System.Security.Cryptography.CryptographicException' in System.Web.dll
Exception thrown: 'EPiServer.Core.ContentNotFoundException' in EPiServer.dll

I have also found some suggestions to look directly into EPi database but I am not so familiar with it so I'll rather wait with that. I can however confirm that in the treeview table there is no item with id 5. 

Any help is very appriciated. I hope this is known issue and can be easily fixed. 

#171336
Edited, Nov 08, 2016 12:16
Vote:
 

Finaly fixed it, with a help from a Epinova consultant. 

We opened a tblSiteDefinition table and found two sites there. One of those sites was just a test site with value 5 for the StartPage. 

We just updated that value to the the value of the other site and it started working.

Big thanks to EPiServer MVP Dejan Caric,

#171532
Nov 09, 2016 16:57
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.