PostgreSQL-不同環境的連線字串
Python
conn_string = "host={0} user={1} dbname={2} password={3} sslmode={4}".format(host, user, dbname, password, sslmode)
C#
錯誤連線字串會顯示【"SslMode" '根據驗證程序,遠端憑證是無效的。'】
與任何連線沒有關係,只是錯誤字串,缺少小字節
TrustServerCertificate=True範例:
string connString = "User ID=<user>;Password=<pass>;Host=<host>;Port=<port>;Database=<database>;Pooling=true;Use SSL Stream=True;SSL Mode=Require;TrustServerCertificate=True;"
留言
張貼留言