PostgreSQL与asp.net的连接 [英] PostgreSQL connection with asp.net
本文介绍了PostgreSQL与asp.net的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到错误
Npgsql.NpgsqlException
{无法建立与"remotServerIP"的连接"}
如果有任何机构可以解决,请plz提供
I am getting error
Npgsql.NpgsqlException
{"Failed to establish a connection to ''remotServerIP''}
If any body have solution so plz provide
推荐答案
如果您有本地服务器(在自己的系统中安装了npgsql),请对服务器使用"localhost"
这是一个示例连接字符串
服务器=本地主机;数据库= db1;用户ID = xxx;密码= xxx;
PostgreSql通常安装在端口5432上.如果已安装在其他端口上,则将该端口添加到连接字符串中
例如:Port = 5432;
(要找到您的端口,请转到pgsql数据目录并打开postgresql.conf并进行检入)
If you have a local server (installed npgsql in your own system) use ''localhost'' for the server
Here''s an example connection string
Server=localhost;Database=db1; User Id=xxx; Password=xxx;
PostgreSql normally installs on port 5432. If you''ve installed on a different port add the port to the connection string
Eg: Port=5432;
(To find out your port, go to the pgsql data directory & open postgresql.conf & check in it)
这篇关于PostgreSQL与asp.net的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文