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.
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"?

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.

Article ID: Published Date: Last Revised Date: Platform: Control:
3795 02/09/2015 02/09/2015 ASP.NET MVC Grid
Tags:
Did you find this information helpful?
Comments
george Qi Jul 18, 2016
not meaningful to useful
Reply
Add Comment
You must log in to leave a comment

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