I have this strange problem which I am stuck with for 2 days now :/
I've added my own functionality to the Nop to show a message to visitor based on their ip-derived location. The problem I have is that when I hit the debug button (or run without debugging) it runs fine and shows the message.
However when I run deploy.bat and point IIS7 to the Deployable\nop_2.0 it breaks with following error:
A public action method 'GeoMessage' was not found on controller 'Nop.Web.Controllers.CatalogController'.
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.Web.HttpException: A public action method 'GeoMessage' was not found on controller 'Nop.Web.Controllers.CatalogController'.
Source Error:
Line 6: </div>
Line 7:
Line 8: @Html.Action("GeoMessage", "Catalog")
Line 9: <div class="clear">
Line 10: </div>
Source File: d:\projects\PKI-COM\Deployable\nop_2.0\Views\Home\Index.cshtml Line: 8
My changes are as follows. I've added a
#region ITidea
[ChildActionOnly]
public ActionResult GeoMessage()
{
method to catalog controller.
I've added a GeoMessage.cshtml view to the Views\Catalog folder and I've created a model in GeoMessageModel.cs in Models\Catalog.
This is especially strage since I've added other methods to the the Catalog controller before and it worked fine. It feels like I can't have done anything wrong since my code IS WORKING fine in debugger.
Gentelmen - your help is most appreciated.
Filip