We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to avoid the exception "Object reference not set to an instance of an object"?

Platform: ASP.NET MVC |
Control: Grid |
Published Date: February 9, 2015 |
Last Revised Date: February 9, 2015
Tags: ejgrid, grid

Problem

While configuring the base assembly during run time in the webconfig file, there are chances of confronting the following exception:

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description

An unhandled exception occurs during the execution of the current web request. 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.

Reason

The runtime binding is not configured in the webconfig for base assembly and thus the above exception is thrown on executing the project.

Solution

You can configure the base assembly in the project by adding the following lines of code in the webconfig file.

<runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="Syncfusion.EJ" publicKeyToken="3d67ed1f87d44c89"/>

        <bindingRedirect oldVersion="0.0.0.0-xx.xxxx.x.xx" newVersion="xx.xxxx.x.xx"/>

      </dependentAssembly>

    </assemblyBinding>

</runtime>

Note: In the above example, xx.xxxx.x.xx denotes the corresponding assembly version to be referred or configured or bound.

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
george Qi
Jul 18, 2016
not meaningful to useful Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon