title: NServiceBus Could not load file or assembly
body: <p>I am getting the below error when i call "NServiceBus.Host.exe". The issue appears to be itextsharp.dll. I've read that i can use</p>
  
  <p>"Configure.With(AllAssemblies.Except("itextsharp.dll"))... // rest of your config"</p>
  
  <p>But i'm using the following sample and not sure where to add this property.  </p>
  
  <p><a href="http://www.nservicebus.com/docs/Samples/AsyncPages.aspx" rel="nofollow">http://docs.particular.net/samples/web/asp-mvc-application/</a></p>
  
  #
  
  <p>Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurr
  ed in Topshelf.Internal.ServiceController<code>1[[NServiceBus.Host.Internal.GenericHo
  st, NServiceBus.Host, Version=2.6.0.1504, Culture=neutral, PublicKeyToken=9fc386
  479f8a226c]] during state Initial while handling OnStart ---&gt; System.Exception:
  Exception when starting endpoint, error has been logged. Reason: Could not load
  file or assembly 'file:///D:\dev\MYSITE\MYSITE.EStore\EStore.Server\bin\Debug\itexts
  harp.dll' or one of its dependencies. Operation is not supported. (Exception fro
  m HRESULT: 0x80131515)
     at NServiceBus.Host.Internal.GenericHost.Start() in d:\BuildAgent-02\work\20b
  5f701adefe8f8\src\host\NServiceBus.Host\Internal\GenericHost.cs:line 90
     at Magnum.StateMachine.EventActionList</code>1.Execute(T stateMachine, Event event,
   Object parameter) in :line 0
     --- End of inner exception stack trace ---</p>
  
  <p>Server stack trace:
     at Magnum.StateMachine.ExceptionActionDictionary<code>1.HandleException(T stateMac
  hine, Event event, Object parameter, Exception exception) in :line 0
     at Magnum.StateMachine.EventActionList</code>1.Execute(T stateMachine, Event event,
   Object parameter) in :line 0
     at Magnum.StateMachine.State<code>1.RaiseEvent(T instance, BasicEvent</code>1 eevent, Ob
  ject value) in :line 0
     at Magnum.StateMachine.StateMachine`1.RaiseEvent(Event raised) in :line 0
     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(
  IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInCont
  ext, Object[]&amp; outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
  sage msg, Int32 methodPtr, Boolean fExecuteInContext)</p>
  
  <p>Exception rethrown at [0]:
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
  Msg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgDa
  ta, Int32 type)
     at Topshelf.Internal.ServiceControllerProxy.Start()
     at Topshelf.Internal.ServiceCoordinator.Start() in d:\dev\open-source\topshel
  f\src\Topshelf\Internal\ServiceCoordinator.cs:line 54
     at Topshelf.Internal.Hosts.ConsoleHost.Run() in d:\dev\open-source\topshelf\s
  rc\Topshelf\Internal\Hosts\ConsoleHost.cs:line 53
     at NServiceBus.Host.Program.Main(String[] args) in d:\BuildAgent-02\work\20b5
  f701adefe8f8\src\host\NServiceBus.Host\Program.cs:line 103</p>