server error for ECP page throws exception upon sign on but OWA works fine - Exchange 2013

J_Nderitu 1 Reputation point
2021-03-18T14:42:36.2+00:00

See below the Error details. this appears after clicking sign in

Server Error in '/ecp' Application.
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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

  1. Add a "Debug=true" directive at the top of the file that generated the error. Example: <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Exchange.Management.ControlPanel.Global..cctor() +98

[TypeInitializationException: The type initializer for 'Microsoft.Exchange.Management.ControlPanel.Global' threw an exception.]
ASP.global_asax..ctor() +28

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +139
System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1431
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +184
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +79
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +178
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,343 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yuki Sun-MSFT 40,856 Reputation points
    2021-03-19T05:16:51.233+00:00

    Hi @J_Nderitu ,

    Before going further, would you please clarify the things below so that we can help you better?

    1. What's the version of your Exchange server?
    2. Is this a recently occurred issue or it started right after the Exchange server is installed?
    3. Any relevant events recorded in the Event Viewer?

    Please try to access ECP via https://localhost/ecp and see if the error persists.

    Besides, it's suggested to refer to the supportability matrix in the link below and make sure the .Net version you are using is supported on your Exchange server:
    Microsoft .NET Framework

    It's also recommended to try temporarily disabling any third party services or software running on the server to help narrow down the issue.

    Any findings, feel free to post back.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Loken Sapkota 1 Reputation point
    2021-04-06T04:54:58.783+00:00

    Hi,

    Did you solve this issue? I am also getting the same problem. No major changes were done in the Exchange Server 2016 and no additional software were installed. Please suggest how you have resolved this issue.

    0 comments No comments