Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Connection String on LocalDb work fine, on Remote Database Server is not Working, Using ADO Net to Remote Database Server also fine

$
0
0

Dear all,

This next ConnectionString to my LocalDb is fine:

"ConnectionStrings": {"AcademicPortalConnection": "Server=(localdb)\\MSSQLLocalDB;Database=AcademicNetPortal;uid=******;pwd=********;Trusted_Connection=True;MultipleActiveResultSets=true"
  },

The next Remote connection string to a remote database server is failed

"ConnectionStrings": {"AcademicPortalConnection": "Server=198.23.81.232,781;Database=******;uid=******;pwd=HuMa@6235;Trusted_Connection=True;MultipleActiveResultSets=true"
  },

Using ADO Net (EntityFramework 6.1.3 connect to the remote database server is working fine:

<connectionStrings><add name="tolhas_netportalEntities" connectionString="metadata=res://*/Models.AcademicNetModel.csdl|res://*/Models.AcademicNetModel.ssdl|res://*/Models.AcademicNetModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=198.23.81.232,781;initial catalog=*********;persist security info=True;user id=*******;password=********;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>

How can I write connectionString in ASP.NET Core using EntitiFrameWorkCode? Can any one help how the correct connectionString on a remote database server?


Thank you very much

Jannen


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>