Search code examples
asp.netsqliteiisconnection-string

Connection string works from Visual Studio, but does not work from IIS


I have developed a website in visual studio express for web 2013. The website pulls data from a SQLite database. This works fine in visual studio. Now I am trying to publish the website on a windows server 2008. I have setup IIS to launch the web site. However, when I launch the website from IIS, I get a Disk I/O error? The connnectionstring="datasource=C:....db;version=3;". Any ideas? Thanks for any help.


Solution

  • Websites in IIS usually run under different account (LocalService). Grant permission to the file to the given account your website is running at. You can find/change the account for website in IIS -> Application pools -> select pool -> Advance Settings.