0
votes

I am using a WCF service with my MVC application, I am having this problem because i have a new computer with a new sql server installation. I am trying to adjust my Web.Config to match my new sql instance.

I am not sure why i get No connection could be made because the target machine actively refused it. but I think it is to do with the fact that my ConnectionString source may not be correct. I have tried using "." and also "(local)" but it doesnt seem to work.

Connection string sample

  <connectionStrings>
    <add name="InventoryManagerEntities" connectionString="metadata=res://*/InventoryManagerModel.csdl|res://*/InventoryManagerModel.ssdl|res://*/InventoryManagerModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=InventoryManager;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>

Sql Server

enter image description here

1
Did you try with SQL server authentication ?Shyju
no just windows authentication @Shyjueagercoder
Is SQL running on the standard port? "1433"MichaelLake

1 Answers

0
votes

The answer was a connection string issue, instead of using just "." I had to use my machine name only without the account name.