Start a new topic
Answered

Storefront Error when build on localmachine

Server Error in '/' Application.Operation returned an invalid status code 'NotFound'
<!DOCTYPE html>
<html>
   <head>
       <title>The resource cannot be found.</title>
       <meta name="viewport" content="width=device-width" />
       <style>
        body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
        p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
        b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
        H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
        H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
        pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
        .marker {font-weight: bold; color: black;text-decoration: none;}
        .version {color: gray;}
        .error {margin-bottom: 10px;}
        .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        @media screen and (max-width: 639px) {
         pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
        }
        @media screen and (max-width: 479px) {
         pre { width: 280px; }
        }
       </style>
   </head>

   <body bgcolor="white">

           <span><H1>Server Error in '/admin' Application.<hr width=100% size=1 color=silver></H1>

           <h2> <i>The resource cannot be found.</i> </h2></span>

           <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

           <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
           <br><br>

           <b> Requested URL: </b>/admin/api/carts/search<br><br>

           <hr width=100% size=1 color=silver>

           <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0

           </font>

   </body>
</html>
<!-- 
[HttpException]: The controller for path &#39;/admin/api/carts/search&#39; was not found or does not implement IController.
  at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
  at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
  at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
  at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
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.Exception: Operation returned an invalid status code 'NotFound'
<!DOCTYPE html>
<html>
   <head>
       <title>The resource cannot be found.</title>
       <meta name="viewport" content="width=device-width" />
       <style>
        body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
        p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
        b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
        H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
        H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
        pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
        .marker {font-weight: bold; color: black;text-decoration: none;}
        .version {color: gray;}
        .error {margin-bottom: 10px;}
        .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        @media screen and (max-width: 639px) {
         pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
        }
        @media screen and (max-width: 479px) {
         pre { width: 280px; }
        }
       </style>
   </head>

   <body bgcolor="white">

           <span><H1>Server Error in '/admin' Application.<hr width=100% size=1 color=silver></H1>

           <h2> <i>The resource cannot be found.</i> </h2></span>

           <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

           <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
           <br><br>

           <b> Requested URL: </b>/admin/api/carts/search<br><br>

           <hr width=100% size=1 color=silver>

           <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0

           </font>

   </body>
</html>
<!-- 
[HttpException]: The controller for path &#39;/admin/api/carts/search&#39; was not found or does not implement IController.
  at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
  at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
  at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
  at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->

Source Error: 

Line 2318:                    _httpResponse.Dispose();
Line 2319:                }
Line 2320:                throw ex;
Line 2321:            }
Line 2322:            // Create Result


Source File: e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\AutoRestClients\CartModuleApi.cs    Line: 2320 

Stack Trace: 

[Exception: Operation returned an invalid status code 'NotFound'
<!DOCTYPE html>
<html>
    <head>
        <title>The resource cannot be found.</title>
        <meta name="viewport" content="width=device-width" />
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
         @media screen and (max-width: 639px) {
          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
         }
         @media screen and (max-width: 479px) {
          pre { width: 280px; }
         }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/admin' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>The resource cannot be found.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
            <br><br>

            <b> Requested URL: </b>/admin/api/carts/search<br><br>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0

            </font>

    </body>
</html>
<!-- 
[HttpException]: The controller for path &#39;/admin/api/carts/search&#39; was not found or does not implement IController.
   at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
   at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
   at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->]
   VirtoCommerce.Storefront.AutoRestClients.CartModuleApi.<SearchWithHttpMessagesAsync>d__ef.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\AutoRestClients\CartModuleApi.cs:2320
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.ConfiguredTaskAwaiter.GetResult() +28
   VirtoCommerce.Storefront.AutoRestClients.CartModuleApi.<SearchAsync>d__5e.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\AutoRestClients\CartModuleApi.cs:3219
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   VirtoCommerce.Storefront.Builders.<<LoadOrCreateNewTransientCartAsync>b__2>d__6.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\Builders\CartBuilder.cs:76
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   VirtoCommerce.Storefront.Model.Common.<GetAsync>d__3`1.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront.Model\Common\CacheManagerExtension.cs:57
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   VirtoCommerce.Storefront.Builders.<LoadOrCreateNewTransientCartAsync>d__c.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\Builders\CartBuilder.cs:65
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   VirtoCommerce.Storefront.Owin.<HandleNonAssetRequest>d__58.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\Owin\WorkContextOwinMiddleware.cs:263
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   VirtoCommerce.Storefront.Owin.<HandleStorefrontRequest>d__28.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\Owin\WorkContextOwinMiddleware.cs:254
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   VirtoCommerce.Storefront.Owin.<Invoke>d__0.MoveNext() in e:\Projects\Ecommerce\vc-storefront\VirtoCommerce.Storefront\Owin\WorkContextOwinMiddleware.cs:71
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<RunApp>d__5.MoveNext() +287
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Security.Infrastructure.<Invoke>d__0.MoveNext() +937
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<RunApp>d__5.MoveNext() +287
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter.GetResult() +26
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<DoFinalWork>d__2.MoveNext() +272
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +26
   Microsoft.Owin.Host.SystemWeb.Infrastructure.ErrorState.Rethrow() +33
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) +150
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork(IAsyncResult ar) +42
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +463
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +183

Best Answer

Thanks for your help & support.

After clean installation eyerything works fine.


Thx again and sorry for delayed reply


Answer

Thanks for your help & support.

After clean installation eyerything works fine.


Thx again and sorry for delayed reply

same error...

Shopping Cart module =


Version

2.12.0

Project Information

Description

Shopping cart / checkout functionality

Platform Version

2.12.0

Dependencies


blob1476182375672.png


If this error happened on Azure, could you give me public link for your storefront instance?  (probably you have wrong storefront configuration) 

no, it's local

Reason of your exception  is a missed POST  {your vc platform host}/admin/api/carts/search API method. You have clean platform code, without any customization? 

yes, no customization

Could you send manually POST http://localhost/admin/api/carts/search with empty body. 

Enter this url in your browser

http://localhost/admin/docs/ui/index#!/Shopping_cart_module/CartModule_Search

set API key a348fa7508d342f6a32f8bf6c6681a2a as in screen above

blob1476193524270.png

Do POST  http://localhost/admin/api/carts/search with empty body

blob1476193587952.png


Check response.


If request return 200 response, need send to us your  storefront web.config   <connectionStrings>  sections content.



Response=200


<connectionStrings>

<add name="VirtoCommerceBaseUrl" connectionString="http://localhost/admin" />

<add name="ContentConnectionString" connectionString="provider=LocalStorage;rootPath=D:/virto2/vc-platform-master/vc-platform-master/VirtoCommerce.Platform.Web/App_Data/cms-content" />

<!--<add name="ContentConnectionString" connectionString="provider=AzureBlobStorage;rootPath=cms-content;DefaultEndpointsProtocol=https;AccountName=yourAccountName;AccountKey=yourAccountKey" />-->

<add name="RedisCache" connectionString="endpoint,password=SECRET,ssl=True,abortConnect=False" />

</connectionStrings>


Could you record Storefront requests to platform API and send to us dump of POST http://localhost/admin/api/carts/search request?

To do that with using Fiddler tools need to do follow steps:


- Download and run Fiddler from http://www.telerik.com/fiddler

- Add to storefront web.config follow section


<system.net>

 <defaultProxy>

  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />

 </defaultProxy>

</system.net>


- Replace 'localhost' to 'your machine name' in storefront web.config

<add name="VirtoCommerceBaseUrl" connectionString="http://localhost  {your machine name}/admin" /> 





Probably reason of these error is a missed Cart module in your VC platform installation. Could you check what Cart module is installed?  Configuration -> Modules -> Installed 



Login or Signup to post a comment