Monday, December 1, 2014

Could not load file or assembly 'System.Data.SQLite' or one of its dependencies.

This is why you're here:
  1. You're getting this error.
    <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    <add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    <add assembly="*"/>
    <add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
    <add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
  2. You're on a Windows OS
  3. You're trying to connect to SQLite (System.Data.SQLite.dll)
  4. You're trying to get an IIS/ASP.NET web application to connect to SQLite
  5. You're in luck.
This a pretty simple fix that we talked about before.

What you need to do is Enable 32-Bit Applications. 



When you Enable 32-Bit Applications (by setting it to true), the worker process(es) serving the application pool will be in WOW64 (Windows on Windows64) mode... which means that your application pool is now a 32-bit process that loads only 32-bit applications.

No comments: