Sql – Database problem moving from VS Development Server to IIS7


I have a project I am trying to move to run on IIS7 instead of the Visual Studio Development Server. Everything works on VS Development Server but when moving to IIS7 its seems to not be able to read anything from the database, but doesn't give a database error, instead it gives a NullReferenceException on the information I'm trying to get from the database. The project uses Linq to get information from the DB if that matters. Also, here is my connection string. I have tried messing with it to no avail.

       <add name="MyProjectConnectionString" connectionString="DataSource=MY-PC\SQLEXPRESS;Initial Catalog=MyProjectsDB;Integrated Security=True" providerName="System.Data.SqlClient"/>

System Information: IIS7 running on Vista Business, SQL Server 2008 Express, and it works fine with Visual Studio Development Server and SQL Server 2008. Thanks for any input!

Best Solution

It's a security issue. You can try using a SQL server user/password or give the IIS user access to that database. The IIS user probably is NETWORK SERVICE