An unhandled exception occured when click "Publish Now"

Jan 15, 2011 at 8:32 AM
Edited Jan 16, 2011 at 8:54 AM

I can't reproduce it after install asp.net MVC3 now.

----------------------------------------------------------------

I just download the source code and run it on Vs 2010, and follow the guide line step by step until I enter the "edit" page. I change nothing and click Publish Now. My version is 1.0.20.

 

Server Error in '/OrchardLocal' Application.

The current request for action 'Edit' on controller type 'AdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult EditPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController
System.Web.Mvc.ActionResult EditAndPublishPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController

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.Reflection.AmbiguousMatchException: The current request for action 'Edit' on controller type 'AdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult EditPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController
System.Web.Mvc.ActionResult EditAndPublishPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController

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:

[AmbiguousMatchException: The current request for action 'Edit' on controller type 'AdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult EditPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController
System.Web.Mvc.ActionResult EditAndPublishPOST(Int32, System.String) on type Orchard.Core.Contents.Controllers.AdminController]
System.Web.Mvc.ActionMethodSelector.FindActionMethod(ControllerContext controllerContext, String actionName) +226
System.Web.Mvc.ReflectedControllerDescriptor.FindAction(ControllerContext controllerContext, String actionName) +182
System.Web.Mvc.ControllerActionInvoker.FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, String actionName) +47
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +283
System.Web.Mvc.Controller.ExecuteCore() +136
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +232
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +39
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +68
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +44
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +42
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +141
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +54
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +38
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +31
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +56
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +110
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) +55
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

 

Is there anyone find the same issue?

Jan 19, 2011 at 12:46 PM

I can reproduce with a clean download of version 1.0.20 a similar error message when attempting to create a new blog post.

Steps to reproduce:

  1. Create new blog called "Support FAQ"
  2. Click "Create New Post"
  3. Enter Title, Body and Tags
  4. Click Publish Now

My system:

  • Windows XP SP3
  • IIS 5.1
  • Previously had MVC 3 installed (upgraded to RTM after using RC1 and 2)

Server Error in '/Orchard' Application.

The current request for action 'Create' on controller type 'BlogPostAdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult CreatePOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController
System.Web.Mvc.ActionResult CreateAndPublishPOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController

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.Reflection.AmbiguousMatchException: The current request for action 'Create' on controller type 'BlogPostAdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult CreatePOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController
System.Web.Mvc.ActionResult CreateAndPublishPOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController

Source Error:


Stack Trace:


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.
[AmbiguousMatchException: The current request for action 'Create' on controller type 'BlogPostAdminController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult CreatePOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController
System.Web.Mvc.ActionResult CreateAndPublishPOST(Int32) on type Orchard.Blogs.Controllers.BlogPostAdminController]
   System.Web.Mvc.ActionMethodSelector.FindActionMethod(ControllerContext controllerContext, String actionName) +452208
   System.Web.Mvc.ReflectedControllerDescriptor.FindAction(ControllerContext controllerContext, String actionName) +62
   System.Web.Mvc.ControllerActionInvoker.FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, String actionName) +16
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +105
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Mvc\Routes\ShellRoute.cs:155
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

 

 

Jan 19, 2011 at 12:53 PM

It has been fixed but I don’t check how.

You need download the lastest source code.