the syntax is incorrect, here you don't need to add the keyword 'port' instead of that try using SERVER_NAME comma PORT_NUMBER like this. its worked for me !
"server=SERVER_NAME,PORT_NUMBER;user=USER_NAME;password=PASSWORD;database=DB_NAME"
In my case this error occurred with dot.net core and Microsoft.Data.SqlClient. The solution was to add
;TrustServerCertificate=true
to the end of the connection string.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.