|
Hi (dmorley :-)),
I'm building a WPF app that handles order dispatched. When I try and use the nop service
When I try and use IOrderProcessingService Ship I get the exception below. It is something to do with notifying the customer because it uses - GetAuthenticatedCustomer
The code it doesn't like is
if (_httpContext == null || _httpContext.Request == null || !_httpContext.Request.IsAuthenticated || !(_httpContext.User.Identity is FormsIdentity))
I figured it was something to do with it being a WPF app and not a web app with http context, but doesn't nop fake http context if its not there?
Darren
System.NotImplementedException was unhandled Message=The method or operation is not implemented. Source=System.Web StackTrace: at System.Web.HttpRequestBase.get_IsAuthenticated() at Nop.Services.Authentication.FormsAuthenticationService.GetAuthenticatedCustomer() in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Authentication\FormsAuthenticationService.cs:line 77 at Nop.Web.Framework.WebWorkContext.GetCurrentCustomer() in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Presentation\Nop.Web.Framework\WebWorkContext.cs:line 75 at Nop.Web.Framework.WebWorkContext.get_CurrentCustomer() in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Presentation\Nop.Web.Framework\WebWorkContext.cs:line 185 at Nop.Web.Framework.WebWorkContext.get_WorkingLanguage() in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Presentation\Nop.Web.Framework\WebWorkContext.cs:line 241 at Nop.Services.Localization.LocalizationExtentions.GetLocalized[T](T entity, Expression`1 keySelector) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Localization\LocalizationExtentions.cs:line 25 at Nop.Services.Messages.MessageTokenProvider.AddOrderTokens(IList`1 tokens, Order order, Int32 languageId) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Messages\MessageTokenProvider.cs:line 421 at Nop.Services.Messages.WorkflowMessageService.GenerateTokens(Order order, Int32 languageId) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Messages\WorkflowMessageService.cs:line 112 at Nop.Services.Messages.WorkflowMessageService.SendOrderCompletedCustomerNotification(Order order, Int32 languageId) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Messages\WorkflowMessageService.cs:line 510 at Nop.Services.Orders.OrderProcessingService.SetOrderStatus(Order order, OrderStatus os, Boolean notifyCustomer) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Orders\OrderProcessingService.cs:line 214 at Nop.Services.Orders.OrderProcessingService.CheckOrderStatus(Order order) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Orders\OrderProcessingService.cs:line 365 at Nop.Services.Orders.OrderProcessingService.Deliver(Order order, Boolean notifyCustomer) in C:\Users\DarrenP\Documents\Visual Studio 2010\Projects\nopCommerce2.4\Libraries\Nop.Services\Orders\OrderProcessingService.cs:line 1631 at WpfApplication3.MainWindow.button1_Click(Object sender, RoutedEventArgs e) in C:\Users\DarrenP\documents\visual studio 2010\Projects\chapter1\WpfApplication3\WpfApplication3\MainWindow.xaml.cs:line 127 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at WpfApplication3.App.Main() in C:\Users\DarrenP\documents\visual studio 2010\Projects\chapter1\WpfApplication3\WpfApplication3\obj\x86\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
|
0
(click on this box to dismiss)
|