Reputation: 16239
I'm trying to connect sql server using following connection string but getting error:
<connectionStrings>
<add name="DefaultConnection"
connectionString="Server=MyMachine32\SQLEXPRESS,1433;Database=MembershipDB;User ID=sa;Password=mydata@123"
providerName="System.Data.SqlClient"/>
</connectionStrings>
Error:
No connection could be made because the target machine actively refused it
I have already enabled TCP/IP from Sql server configuration manager. what else needed?
Upvotes: 0
Views: 2102
Reputation: 172608
Please check the Firewall setting, most likely it is stopping it. Try to turn off your Firewall and check if it works. Also it may be that the process which is hosting the service is not listening on that port.
Upvotes: 2