Finutia
  • Home
  • Blogutia
  • About
  • Contact

Entry point was not found

7/24/2013

1 Comment

 
I was in the process of implementing Telerik's Kendo UI for ASP.NET MVC into a mixed ASPX / MVC 4 application when I ran into a problem that stopped me dead in my tracks for longer than I care to admit. Here is the main portion of the error message:

Server Error in '[my]' Application.


Entry point was not found.

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.EntryPointNotFoundException: Entry point was not found.
(refer to the bottom of this post for the full error message)
Since the assemblyBinding section definitely was there, I could only deduce that ASP.NET was ignoring it for some reason. To test my theory I intentionally misspelled some of the tags in the assemblyBinding section and refreshed my test web page. My suspicion was confirmed when IIS didn't choke on the misspelling,

So why was ASP.NET ignoring the assemblyBinding section? I'd already confirmed (more than once) that the assemblyBinding config section was properly positioned and formatted within the config. In fact, the section had been added quite a while before with an assembly binding for something unrelated to Kendo. So I went back to Binging and Googling, and in short order StackOverflow saved the day.

The StackOverflow question was "Why is assembly binding redirect not working on my web site?", and one of the first things the post author stated was "I have already removed the xmlns='http://schemas.microsoft.com/.NetConfiguration/v2.0" attribute from the root configuration element."

I hadn't done that. In fact, I wasn't even sure if my root configuration element had that attribute set. Once more I opened Web.config, and I'll be darned if my root configuration tag didn't have exactly what the StackOverflow user had removed from his.

I purged the xmlns='http://schemas.microsoft.com/.NetConfiguration/v2.0" attribute from my root configuration element, clicked refresh on my test page, and to my great relief the "Entry point was not found" error was nowhere to be found.

Lessons learned? 
  1. Submit the support ticket sooner. The hours I spent spinning my wheels before I submitted the support ticket wouldn't have been necessary if I'd submitted the support ticket right after I verified that I'd done everything as Telerik instructed.
  2. Don't assume that something is working just because it's already in the code or the config file. My Web.config file already had an assemblyBinding section in it before I added the bindings specified for Kendo. It didn't cross my mind that the section may have only been put in the config to drive me nuts later....
  3. Keep code and config files clean! Dead, deprecated or test code should be removed, or at least clearly commented if it needs to be left in for some reason. Developers that refactor the code later will thank you!

I already had MVC 4 playing nicely within my ASPX web project, and I had followed Telerik's step-by-step Kendo UI for ASP.NET MVC installation instructions exactly. I had no idea what I'd done wrong. I just knew from the call stack that Kendo was choking on a call to System.Web.Mvc. 
I combed through my Web.config file. I examined the Kendo.MVC.dll's manifest and  triple-checked my project's DLL references and my computer's GAC to make sure that all the right versions of all the needed DLLs were available. I Googled. I Binged. I prayed. Really. Finally I did what I probably should have done much sooner: I submitted a support ticket to Telerik.

The answer wasn't as helpful as I hoped:
This exception is thrown when the assembly binding configuration that is described in the configuration is not added. Please verify that the configuration is included correctly in the main Web.config file. There are not any other known reasons for this exception and if the problem persists, please send a small runnable sample so I can investigate further.
Waaaaaahhhh! My Web.config file already had the "assembly binding configuration" that Telerik told me to put in it, and I wasn't particularly keen on trying to create a "small runnable sample" for the support tech. I figured that would take a long time (the existing project I was integrating Kendo into is very large and complex), and I was afraid I might not even be able to recreate the problem in a sample project.

As I pondered what to do next, it dawned on me that the Telerik support tech might have given me the key to solving the problem: "There are not any other known reasons for this exception...." 

Hmmmm... I had added the specified dependent assemblies to an existing "assemblyBinding" section in my Web.config:
    <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

Here is the full error message:

Server Error in '/Sentry2010' Application.


Entry point was not found.

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.EntryPointNotFoundException: Entry point was not found.

Source Error:

 Line 10:     <div id="options"> Line 11:        <h3>T-shirt Fabric</h3> Line 12:     @(Html.Kendo().ComboBox() Line 13:           .Name("fabric") Line 14:           .Filter("contains") 

Source File: c:\Develop\Solutions\Application\src\My.Application\View\Web\View.Web\Areas\ApplicationReporter\Views\ReporterSets\ReporterSets.cshtml   Line: 12

Stack Trace:

 [EntryPointNotFoundException: Entry point was not found.]    System.Web.Mvc.IViewDataContainer.get_ViewData() +0    Kendo.Mvc.UI.Fluent.WidgetFactory.ComboBox() +36    ASP._Page_Areas_ApplicationReporter_Views_ReporterSets_ReporterSets_cshtml.Execute() in c:\Develop\Solutions\Application\src\My.Application\View\Web\View.Web\Areas\ApplicationReporter\Views\ReporterSets\ReporterSets.cshtml:12    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197    System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +97    System.Web.WebPages.StartPage.RunPage() +17    System.Web.WebPages.StartPage.ExecutePageHierarchy() +62    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76    System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +260    System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +295    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13    System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242    System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177    System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +89    System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43    System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10    System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25    System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9630364    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155  

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 
1 Comment
VV
2/26/2014 03:13:54 pm

Thanks a lot, that helped me too!

Reply



Leave a Reply.

    Blogutia

    [blawgooshuh]
    noun
    A collection of information, experiences, observations and commentary, that pays attention to the fine details that matter.

    Archives

    March 2015
    January 2015
    October 2014
    May 2014
    July 2013

    Categories

    All
    Adobe InDesign
    ASP.NET
    Bugs
    C#
    Microsoft Excel
    Multimedia
    Mvc
    Templates
    Tips & Tricks
    Web Development

    RSS Feed


© Copyright 2013 Fīnutia LLC  — All Rights Reserved