Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Le Xuan Trung 10 posts 80 karma points
    Aug 21, 2015 @ 03:33
    Le Xuan Trung
    0

    Value cannot be null. Parameter name: meth

    Hi all.

    I will petapoco to querying with DB. But when run it getting error.

    Server Error in '/' Application.
    Value cannot be null.
    Parameter name: meth
    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.ArgumentNullException: Value cannot be null.
    Parameter name: meth
    
    Source Error:
    
    
    Line 63:                 <div class="content-gallery-top-content-background-photo">
    Line 64:                     @{
    Line 65:                         foreach (var item in bdt)
    Line 66:                         {
    Line 67:                             <div class="content-gallery-top-content-background-photo-photo1">
    
    
    Source File: c:\Users\Administrator\New folder\trunk\d2cms\d2cms.Web\Views\Gallery.cshtml    Line: 65
    
    Stack Trace:
    
    
    [ArgumentNullException: Value cannot be null.
    Parameter name: meth]
       System.Reflection.Emit.DynamicILGenerator.Emit(OpCode opcode, MethodInfo meth) +10834486
       Umbraco.Core.Persistence.PocoData.GetFactory(String sql, String connString, Boolean ForceDateTimesToUtc, Int32 firstColumn, Int32 countColumns, IDataReader r) +4050
       Umbraco.Core.Persistence.<Query>d__7`1.MoveNext() +331
       ASP._Page_Views_Gallery_cshtml.Execute() in c:\Users\Administrator\New folder\trunk\d2cms\d2cms.Web\Views\Gallery.cshtml:65
       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
       StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\MVCHelpers\WrappedView.cs:58
       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.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.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +324
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +23
       System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +19
       System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
       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() +9514812
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    

    Please HELP ME. Thank a lot.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Aug 21, 2015 @ 08:04
    Nik
    0

    It looks like what ever populates your bdt variable isn't returning anything and so bdt is empty.

    What debugging steps have you tried?

Please Sign in or register to post replies

Write your reply to:

Draft