refused my local machine sql connection for 1433 p

2019-06-10 21:33发布

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?

2条回答
SAY GOODBYE
2楼-- · 2019-06-10 21:49

You have tagged your question with "Azure".

So, check if in Azure settings there is a rule to grant at your machine access on DB hosted in Azure space.

You can go here, a guide about Azure firewall rule.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-06-10 21:52

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.

查看更多
登录 后发表回答