I've built an .asmx web service which retrieves informations from a local sql server 2014 database. Everything is working fine on localhost, but after publishing the web service to Azure i get the error:
An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll
Additional information: Server was unable to process request. ---> 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, error: 26 - Error Locating Server/Instance Specified)
SQL Server is configured to allow remote connections.
My connection string is like:
string con2 = @"Data Source=OfficePc\MSSQLSERVER2014;Initial Catalog=Database;Persist Security Info=True;User ID=Admin;Password=123456";
Is the error the result of something missing from the connection string, or am i missing some configurations changes?