1

I have created a WPF application which used entity framework and SQL server 2012 for database. It runs fine on my machine. But when I ran this on client machine I received exception. This happens when I am trying to add a record in database.

Exception: The underlying provider failed on Open Inner Exception: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, ........

Connection string:

<connectionStrings><add name="SchoolModelContext" 
    connectionString="metadata=res://*/SchoolModel.csdl|res://*/SchoolModel.ssdl|res://*/SchoolModel.msl;
    provider=System.Data.SqlClient;provider connection string='data source=(LocalDB)\v11.0;
    initial catalog=&quot;SCHOOLDB.MDF&quot;
    integrated security=True;MultipleActiveResultSets=True;
    App=EntityFramework'" providerName="System.Data.EntityClient" />
</connectionStrings>
4

1 に答える 1