I have a SQL Server connection string in a config file:
<add name="DbMaster" connectionString="Data Source=ServerName\NamedInstance;Initial Catalog=SomeDb;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
This is fine if I am running from the domain where the SQL Server is located, but I receive the following error on a different domain:
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
There is a trust between the domains.
I tried the following with no success:
<add name="DbMaster" connectionString="Data Source=ServerName.DOMAIN.COM\NamedInstance;Initial Catalog=SomeDb;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
I can ping ServerName.DOMAIN.COM.
I have tried connecting to the SQL Server on a different domain using SQL Server Management Studio but the same error as above is received.
Is there something obvious I am doing wrong?