November Happy Hour will be moved to Thursday December 5th.

Object Reference while trying to access epicms in local machine - https://local.XXXX.com/episerver

Vote:
 

 - dont have any other details logged in episerver log other than the below details. have anyone faced this error before in local machine.. its windows 10 and Visual studio Enterprise 2019

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.]
   EPiServer.Shell.Web.Mvc.HttpContextBaseExtensions.SetCulture(HttpContextBase httpContext, ICurrentUiCulture currentUiCulture) +185
   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessRequestInit(HttpContextBase httpContext) +27
   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +16
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1128
   System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +40
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +155
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134
#260214
Edited, Aug 06, 2021 16:49
Vote:
 

Does it help if you set * as hostname for the site? And/or set the correct culture for that site?
Admin mode-> Config -> Manage websites -> Click on your site.

#260280
Aug 08, 2021 10:01
Vote:
 

Thanks for the reply. actually i configured like local.<brandname>.com/episerver . just for security purpose i put xxxxx in hostname .

i am getting "object reference not set to an instance of an object." while trying to access epicms so i cant change any configuration until i login to epicms.

#260345
Aug 09, 2021 13:53
Vote:
 

If you don't have access to admin mode, you can set hostnames directly in the tblHostDefinition table.

Do you get more info in error logs?

Have you tried to set a breakpoint in global.asax.cs and catch Server.GetLastError()...

If you're using IIS, you might need to install some IIS features, including the URL Rewrite module (https://support.optimizely.com/hc/en-us/articles/115004123226-Installing-Commonly-Used-IIS-Features-Using-Powershell)

Hope this helps!

#260395
Edited, Aug 10, 2021 9:20
Vote:
 

just out of curiousity, what do you have in `system.web/globalization` element in `web.config` file?

#260895
Aug 20, 2021 18:48
Vote:
 

Hi All, there was some issue in my IIS and fixing those which fixed the abve error. Its not related to Episerver. Thank you all..

#261001
Aug 23, 2021 16:50
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.