title: WCF Application "Unable to find assembly" for SQLite
body: <p>Note: This is a solved problem, but I just spend 4 hours at this issue, so I wanted to share the solution.</p>
  
  <hr>
  
  <p>When I attempt to access a WCF service, the service never responds, and the event log shows the following:</p>
  
  <blockquote>
    <p>An unhandled exception occurred and
    the process was terminated.</p>
    
    <p>Application ID: DefaultDomain</p>
    
    <p>Process ID: 3180</p>
    
    <p>Exception:
    System.Runtime.Serialization.SerializationException</p>
    
    <p>Message: Unable to find assembly
    'System.Data.SQLite, Version=1.0.66.0,
    Culture=neutral,
    PublicKeyToken=db937bc2d44ff139'.</p>
    
    <p>StackTrace:    at
    System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
    at
    System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo
    assemblyInfo, String name)    at
    System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String
    objectName, String[] memberNames,
    BinaryTypeEnum[] binaryTypeEnumA,
    Object[] typeInformationA, Int32[]
    memberAssemIds, ObjectReader
    objectReader, Int32 objectId,
    BinaryAssemblyInfo assemblyInfo,
    SizedArray assemIdToAssemblyTable)<br>
    at
    System.Runtime.Serialization.Formatters.Binary._<em>BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped
    record)    at
    System.Runtime.Serialization.Formatters.Binary.</em>_BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum
    binaryHeaderEnum)    at
    System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
    at
    System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
    handler, __BinaryParser serParser,
    Boolean fCheck, Boolean
    isCrossAppDomain, IMethodCallMessage
    methodCallMessage)    at
    System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
    serializationStream, HeaderHandler
    handler, Boolean fCheck, Boolean
    isCrossAppDomain, IMethodCallMessage
    methodCallMessage)    at
    System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream
    stm)    at
    System.AppDomain.Deserialize(Byte[]
    blob)    at
    System.AppDomain.UnmarshalObject(Byte[]
    blob)</p>
  </blockquote>
  
  <hr>
  
  <p><strong>Solution</strong>
  In my case, the problem ended up being a simple incorrect database path.  However, the error message in no way reflects the actual cause, so YMMV.  </p>
  
  <p>The reason the "bad connection string" exception didn't make it to the event log seems related to <a href="http://support.microsoft.com/kb/911816" rel="nofollow">this KB article</a>.  If the connection string isn't your problem, then your best course may be to follow the steps in this article, which will cause IIS to write exceptions to the event log.</p>