Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 30th, 2012  |  syntax: None  |  size: 4.43 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. WPF Client App:
  2.  
  3. public partial class App : Application
  4.     {
  5.         public static IBus Bus { get; set; }
  6.         protected override void OnStartup(StartupEventArgs e)
  7.         {
  8.             base.OnStartup(e);
  9.             Bus = Configure.With()
  10.                 .Log4Net()
  11.                 .XmlSerializer()
  12.                 .MsmqTransport()
  13.                     .IsTransactional(true)
  14.                 .UnicastBus()
  15.                     .LoadMessageHandlers()
  16.                 .CreateBus()
  17.                 .Start();
  18.            
  19.  
  20.             Bus.Send(new OneMessage() {Title = "This is a sample message"});
  21.         }
  22.  
  23.     }
  24.  
  25. results in:
  26.  
  27. System.NullReferenceException was unhandled
  28.   Message=Object reference not set to an instance of an object.
  29.   Source=NServiceBus.Core
  30.   StackTrace:
  31.        at NServiceBus.ConfigureXmlSerializer.XmlSerializer(Configure config) in d:\BuildAgent-03\work\d692fe98ef9a76ca\src\impl\Serializers\NServiceBus.Serializers.XML.Config\ConfigureXmlSerializer.cs:line 20
  32.        at Life.Store.Client.App.OnStartup(StartupEventArgs e) in C:\Users\daniel\Documents\open-source\Life.Store\src\Life.Store.Client\App.xaml.cs:line 21
  33.        at System.Windows.Application.<.ctor>b__1(Object unused)
  34.        at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  35.        at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
  36.        at System.Windows.Threading.DispatcherOperation.InvokeImpl()
  37.        at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
  38.        at System.Threading.ExecutionContext.runTryCode(Object userData)
  39.        at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
  40.        at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  41.        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
  42.        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  43.        at System.Windows.Threading.DispatcherOperation.Invoke()
  44.        at System.Windows.Threading.Dispatcher.ProcessQueue()
  45.        at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  46.        at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  47.        at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
  48.        at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  49.        at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
  50.        at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
  51.        at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  52.        at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
  53.        at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
  54.        at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
  55.        at System.Windows.Threading.Dispatcher.Run()
  56.        at System.Windows.Application.RunDispatcher(Object ignore)
  57.        at System.Windows.Application.RunInternal(Window window)
  58.        at System.Windows.Application.Run(Window window)
  59.        at System.Windows.Application.Run()
  60.        at Life.Store.Client.App.Main() in C:\Users\daniel\Documents\open-source\Life.Store\src\Life.Store.Client\obj\x86\Debug\App.g.cs:line 0
  61.        at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
  62.        at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
  63.        at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
  64.        at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
  65.        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
  66.        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  67.        at System.Threading.ThreadHelper.ThreadStart()
  68.   InnerException: