0

I'm trying to connect to analysis services by C# .net, from my desktop computer, to a server that includes that service.I used 'Server' class in C# to make the connection but i got the following error

"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host"

, then I try to ran my program inside the server locally and i saw that it ran successfully.I considered all authentication parameters in my connection string in both tests.I tried another test ,to see if the problem was from my computer, I ran my program in another computer which had the same username and password like my server and i see it worked successfully too.

This is my code

Server server = new Server();
server.Connect("Provider=SQLNCLI11.1;Data Source=192.168.30.212;User ID = administrator;Password =XXXXXXX;Initial Catalog = Cubeee;");

do you think that this a security bug from microsoft ?!

mrcs
  • 1
  • 1
  • _"do you think that this a security bug from microsoft ?!"_ - doubtful. _"[The First Rule of Programming: It's Always Your Fault](https://blog.codinghorror.com/the-first-rule-of-programming-its-always-your-fault/)"_ –  Jun 10 '17 at 07:00
  • Are you able to ping the Data Source IP from the computer where you're getting the connection error? – Poosh Jun 10 '17 at 07:25
  • Please see my answer here: https://stackoverflow.com/a/33671651/5070440 – GregGalloway Jun 10 '17 at 10:17
  • Possible duplicate of [Connecting to Analysis Service from ASP.net application](https://stackoverflow.com/questions/33668819/connecting-to-analysis-service-from-asp-net-application) – GregGalloway Jun 10 '17 at 10:20
  • Thanks to you GregGalloway, my problem solved ! – mrcs Jun 11 '17 at 12:05

0 Answers0