DX Application Performance Management

  • 1.  CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Posted Nov 26, 2014 07:54 AM

    I have several web applications that use the Ninject library for dependency injection and are meant to run as 64bit web applications.  However all requests to the application return -

     

    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:

    [InvalidProgramException: Common Language Runtime detected an invalid program.]

       System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method) +0

       System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType) +37

       Ninject.Injection.DynamicMethodInjectorFactory.Create(ConstructorInfo constructor) +849

       Ninject.Planning.Strategies.ConstructorReflectionStrategy.Execute(IPlan plan) +194

       Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable`1 series, Action`1 action) +136

       Ninject.Planning.Planner.CreateNewPlan(Type type) +277

       Ninject.Planning.Planner.GetPlan(Type type) +123

       Ninject.Activation.Context.Resolve() +686

       System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +265

       System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +300

       System.Linq.WhereSelectArrayIterator`2.MoveNext() +111

       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +472

       System.Linq.Enumerable.ToArray(IEnumerable`1 source) +102

       Ninject.Activation.Providers.StandardProvider.Create(IContext context) +651

       Ninject.Activation.Context.Resolve() +315

       System.Linq.WhereSelectListIterator`2.MoveNext() +323

       System.Linq.<CastIterator>d__b1`1.MoveNext() +296

       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +552

       System.Linq.Enumerable.ToList(IEnumerable`1 source) +76

       Ninject.Web.Common.NinjectHttpModule.Init(HttpApplication context) +111

       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +597

       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +203

       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +389

       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +250

     

    If i put the web application in 32bit mode it seems to work, but the application is meant to run as 64bit.  Is there any configuration in wily or any explanation on what the issue is here and how to resolve it or work around it without using 32bit mode?



  • 2.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Broadcom Employee
    Posted Nov 26, 2014 12:59 PM

    Hi,

     

    We have a KB article on this.

     

    Dot Net agent - webservices application won't start - Common Language Runtime detected an invalid program

    Document ID:  TEC596466

     

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec596466.aspx

     

     

    Please take a look and see if this helps.

     

    Regards,
    Matt



  • 3.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Posted Nov 26, 2014 02:36 PM

    Thanks Matt –

     

    I already have that line commented out, however it did not resolve the issue.

     

    Kyle Engibous

    Internet Application Server Consultant

    Bank Solutions – eSolutions Architecture

    Fiserv

    Office: 262-879-5371

    www.fiserv.com<http://www.fiserv.com/>

     

     

    FORTUNE® Magazine’s 2014 World's Most Admired Companies

    Facebook: Like Fiserv<http://www.facebook.com/fiserv>  ·  Twitter: Follow @Fiserv<http://www.twitter.com/fiserv>  ·  LinkedIn: Connect Fiserv<http://www.linkedin.com/company/fiserv>  •  Careers: Join Fiserv<http://adtrk.tw/3mVZw>



  • 4.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Posted Nov 26, 2014 03:45 PM

    Hi Kyle,

    What version of .NET Agent have you tried ?

    There were code changes done in later releases for e.g 9.1.7 and for earlier versions hotfix were created.

    I would recommend opening a support so we can validate above details and provide a hotfix if applicable to .NET Agent version deployed on your end.

     

    Regards,

    Kulbir.

    CA Support.



  • 5.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Posted Nov 26, 2014 03:50 PM

    Thanks Kulbir –

     

    We have version 9.5.1.0 of the .NET agent installed on our servers and we are encountering the issue I have reported.  We have also tired an older version 9.1.1.1 with no luck.

     

     

    Kyle Engibous

    Internet Application Server Consultant

    Bank Solutions – eSolutions Architecture

    Fiserv

    Office: 262-879-5371

    www.fiserv.com<http://www.fiserv.com/>

     

     

    FORTUNE® Magazine’s 2014 World's Most Admired Companies

    Facebook: Like Fiserv<http://www.facebook.com/fiserv>  ·  Twitter: Follow @Fiserv<http://www.twitter.com/fiserv>  ·  LinkedIn: Connect Fiserv<http://www.linkedin.com/company/fiserv>  •  Careers: Join Fiserv<http://adtrk.tw/3mVZw>



  • 6.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)

    Posted Nov 26, 2014 04:44 PM

    Kyle-

    9.5.1 Agent should have the fix to the issue caused by Microsoft Security Patch MS13-004 which also caused same error "Invalid Program..." when Agent was deployed, 9.1.1.1 doesn't have those same changes though. Given that app runs fine in 32 bit mode it seems more like a bit compatibility issue, was your 64 bit application compiled with 32 bit ninject library ?

     

    -Kulbir.



  • 7.  Re: CA Wily breaks .NET applications using the Ninject library for dependency injection. (9.1.X.X / 9.5.X.X)
    Best Answer

    Posted Jul 28, 2015 06:36 AM

    Hi Kyle,

     

    There was an issue in the Ninject library itself, which we uncovered and worked with the Ninject developers to get fixed.

    They have fixed it, and we have verified that the problem has been fully resolved. The fix is available in the most recent version of Ninject which can be found here: http://www.ninject.org/download.html

     

    This is all documented in a nice KB article here:

     

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1573975.aspx

     

    I hope this should answer your question?

     

    Regs,

     

    Florian.