getting exception when try to inject CInject 1.3.1the

Dec 21, 2013 at 5:52 AM
Dear Team,

I am trying to inject my dll using CInject 1.3.1(Download from codeplex) and getting error. I have follw the below step for profiling.
  1. Inject My dll using CInject according as per your documentation (https://codeinject.codeplex.com/documentation)
  2. Execute the target assembly(via web application) and getting bellow error:
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.]
CInject.Injections.Library.Logger..cctor() +70

[TypeInitializationException: The type initializer for 'CInject.Injections.Library.Logger' threw an exception.]
CInject.Injections.Library.Logger.Error(Exception exception) +0
CInject.Injections.Injectors.LogInject.OnInvoke(CInjection injection) +1505
_Default.Page_Load(Object sender, EventArgs e) +163
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Coordinator
Dec 21, 2013 at 1:29 PM
This can be because it is missing configuration file in the local folder LogInject.log4net.xml

I've added the functionality of automatic copying of DependentFiles in version 1.4 along with other fixes. Try using that. thanks