title: 'Object reference not set to an instance of an object' after successful deployment. ASP.NET MVC
body: <p>My app works fine locally on debug and on release mode, but not on deployment.
  I deployed the app on our server. and it works ok till I try to use the search function from one of my pages and receive 'Object reference not set to an instance of an object'. Search work perfectly fine locally. </p>
  
  <p>this is the error that shows up:</p>
  
  <blockquote>
    <p>[NullReferenceException: Object reference not set to an instance of an
    object.]<br>
    Facility.Controllers.Filters.&lt;>c__DisplayClass1_0.b__0(Notification
    s) in
    C:\LocalSVN\FacilityManagement\Facility\Controllers\Filters\NotificationsFilters.cs:52
    System.Linq.WhereEnumerableIterator<code>1.MoveNext() +122<br>
    System.Collections.Generic.List</code>1..ctor(IEnumerable<code>1 collection) +503
    System.Linq.Enumerable.ToList(IEnumerable</code>1 source) +69<br>
    AutoMapper.Mappers.EnumerableMapperBase`1.Map(ResolutionContext
    context) +184    AutoMapper.MappingEngine.Map(ResolutionContext
    context) +535</p>
    
    <p>[AutoMapperMappingException: </p>
    
    <p>Mapping types: IEnumerable<code>1 -&gt; IEnumerable</code>1
    System.Collections.Generic.IEnumerable<code>1[[Facility.Model.Notification,
    Facility.Model, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=null]] -&gt;
    System.Collections.Generic.IEnumerable</code>1[[Facility.ViewModels.NotificationListVM,
    Facility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]</p>
    
    <p>Destination path: IEnumerable`1</p>
  </blockquote>
  
  <p>Is it something with linq or automapper? how do I solve this?</p>