You are on page 1of 1

Server Error in '/' Application.

The parameters dictionary contains a null entry for parameter 'idCategoria' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult _leiamaisprodcompar(System.Nullable`1[System.Int32], Int32)' in
'Minipa.Controllers.ProdutosController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
Description: An unhandled exception occurred during the execution of the current w eb request. Please review the stack trace for more information about the error and w here it originated in the code.

Exception Details: System.ArgumentException: The parameters dictionary contains a null entry for parameter 'idCategoria' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult _leiamaisprodcompar(System.Nullable`1[System.Int32], Int32)' in 'Minipa.Controllers.ProdutosController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters

Source Error:

Line 65: <div class="compare_produto_resultado" style="float:left;">


Line 66: <%Html.RenderAction("_fotoprodcompar", "Produtos", new { idProduto = idproduto1 }); %> <strong><%Html.RenderAction("_nomeprodcompar", "Produtos", new { idProduto = idproduto1 }); %></strong>
Line 67: <%Html.RenderAction("_leiamaisprodcompar", "Produtos", new { idProduto = idproduto1, idCategoria = TempData["idCategoria"] }); %>
Line 68: </div>
Line 69:

Source File: e:\home\minipa1\Web\View s\Produtos\CompareResultado.aspx Line: 67

Stack Trace:

[ArgumentException: The parameters dictionary contains a null entry for parameter 'idCategoria' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult _leiamaisprodcompar(System.Nullable`1[System.Int32], Int32)' in 'Minipa.Controllers.ProdutosController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters]
System.Web.Mvc.ActionDescriptor.ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary`2 parameters, MethodInfo methodInfo) +472
System.Web.Mvc.<>c__DisplayClass1.<Execute>b__0(ParameterInfo parameterInfo) +28
System.Linq.WhereSelectArrayIterator`2.MoveNext() +69
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +365
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +76
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +145
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +132
System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +275
System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +22
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +201
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +346
System.Web.Mvc.Controller.ExecuteCore() +90
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +42
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +38
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() +53
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +13
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +22
System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +10
System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +27
System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +74
System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +79
System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +983

[HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]


System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +2231
System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +78
System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +25
System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +20
System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +378
System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +45
System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, String controllerName, Object routeValues) +45
ASP.views_produtos_compareresultado_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in e:\home\minipa1\Web\Views\Produtos\CompareResultado.aspx:67
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +86
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +94
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +210
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +106
ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in e:\home\minipa1\Web\Views\Shared\Site.Master:214
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +86
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +94
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +210
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +106
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +183
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +9
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Page.Render(HtmlTextWriter writer) +107
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +94
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +210
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +106
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4088

Version Information: Microsoft .NET Framew ork Version:4.0.30319; ASP.NET Version:4.0.30319.34280

open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com

You might also like