Object reference not set to an instance of an object.

thanh phuoc asked on January 11, 2015 05:29

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.] CMS.URLRewritingEngine.URLRewriter.RewriteUrl(String relativePath, ExcludedSystemEnum excludedEnum, SiteNameOnDemand siteName, ViewModeOnDemand viewMode) +4110 CMS.URLRewritingEngine.URLRewriter.RewriteUrl(RequestStatusEnum status, String relativePath, ExcludedSystemEnum excludedEnum) +61 CMS.URLRewritingEngine.URLRewritingHandlers.RewriteUrl(Object sender, EventArgs e) +55 CMS.Base.AbstractHandler.CallEventHandler(EventHandler1 h, TArgs e) +100 CMS.Base.AbstractHandler.Raise(String partName, List1 list, TArgs e, Boolean important) +685 CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) +95 CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) +123 CMS.Base.SimpleHandler`2.StartEvent(TArgs e) +216 CMS.Base.ApplicationModule.MapRequestHandler(Object sender, EventArgs e) +12 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Recent Answers


thanh phuoc answered on January 11, 2015 05:29

Help me :(

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on January 12, 2015 00:19

Thanh, would be happy to help you but we are going to need some more information than what you provided. Where are you getting this message, is it custom code or a default webpart or a system page?

Also, what version of Kentico are you using. If custom code did you try commenting it out and see if you still get the error.

Provide some more information and someone would be happy to help

0 votesVote for this answer Mark as a Correct answer

Vilém Jeniš answered on January 12, 2015 15:54

Hi Thanh!

As Virgil writes, this is far from enough information. I know where the exception is comming from but we don't have enough information to know what's causing it. My guess is that relativePath passed to the method is null, but I can't know why unless you give us more.

Help us to help you!

0 votesVote for this answer Mark as a Correct answer

Laura Frese answered on June 13, 2016 21:41

If anybody else runs into this issue & it is associated with moving a site from one server to another, make sure the proper site url is pointed to within your kentico site(ensure it matches the domain/url for the site in IIS).

0 votesVote for this answer Mark as a Correct answer

javier saenz answered on August 17, 2016 00:20

Hi I'm having the same problem when I update Kentico8.2 to Kentico9. Also the admin dashboard is empty, I've tried cleaning cache, re-updating etc

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.