Click here to Skip to main content
15,843,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I am using application try to connect with PostgreSQL server hosted in my machine.
I have successfully connected my database and able to access.
When i host my application in another server (within the same network) and try to connect PostgreSQL database server via application i am getting "Exception while connecting" error occurred.

Connection String:

Could you please share how to resolve this issue. Thanks in advance.

What I have tried:

I have tried with port no. is connection string as like below.

Updated 20-Jun-21 6:19am

1 solution is LOCALHOST. That means your connection string assumes the SQL server and the web server are running on the same machine.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900