Witajcie. Piszę apkę z użyciem .Net Core. Oczywiście też EF Core do połączenia do bazy. Zazwyczaj pracuje na windowsie. Tak stworzyłem sobie projekt (.net core 2.2). Konfiguracja, połączenie do bazy wszystko gra. Baza jest w sieci LAN, na serwerze Windows Server 2008. Wersja SQL to 2008 R2.
Mój connection string wygląda tak:
"ConnectionString": "Server=192.168.30.37\SQLEXPRESS,49289;Database=Baza;Integrated Security=False;User ID=sa;Password=****;"
I pod windowsem to działa. Następnie postawiłem sobie Ubuntu 18.04. I odpaliłem projekt w Visual Studio Code. Kompiluje się i uruchamia, ale w momencie połączenia do bazy mam:
Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=52; handshake=212; [Login] initialization=0; authentication=17; [Post-Login] complete=14059;
Zmiana connection stringa nie pomaga. Co najwyżej nie może znaleźć instancji servera.
Na ubuntu zainstalowałem sobie pakiet FreeTDS i połączyłem się z bazą danych za pomocą narzędzia tsql. Pobieram dane itp. Więc wykluczam problemy sieciowe.
Wygooglowałem sobie, connectionstring powinien wyglądać tak:
"ConnectionString": "Server=192.168.30.37,49289;Database=Baza;Integrated Security=False;User ID=sa;Password=****;"
Ale to też nie nie pomaga. Ktoś miał podobne problemy?