Trying to test web API access on our SQL 2008 server but keep getting error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.TypeInitializationException: The type initializer for 'Tessitura.WebAPI.Tessitura' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Tessitura.WebAPI.Config' threw an exception. ---> System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
All we're doing is changing the IP address in connection string of web.config for the web API. I've tried restarting the service, recycled the app pool, ensured that SQL Server does allow remote connections, and verified the ports enabled in Windows firewall...not sure what else to check. Any suggestions?
Thanks, Lori
Lori,
Have you tried entering the database instance name in the Data Source string after the IP address?
Here's what's in my web.config file:
<add key="CONNECTION_STRING" value="Data Source=servername\instancename;Initial Catalog=impresario;User ID=xxxxxxxxxxx;Password=xxxxxxxxxxxxxxx"/><!-- TESSITURA DATABASE CONNECTION STRING -->