Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7738555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:17:47+00:00 2026-06-01T08:17:47+00:00

I am lost. I have localhost database (PostgreSQL) and I have to add port

  • 0

I am lost. I have localhost database (PostgreSQL) and I have to add port for connection (in app.config — connection string). I alredy tried:

localhost:port
localhost,port
(localhost),port
(local),port

None of this work, everytime I got error “The requested name is valid, but no data of the requested type was found” thrown by System.Net.Dns.InternalGetHostByName with message “cannot open connection”.

So how do you specify the port? I checked this on computer with just single instance of DB server, so port could be ommitted and then it works. But I need adding port.

Update

<add key="ConnectionString" value="Server=localhost;
 Port=5434;
 Database=XXXXXXX;Initial Catalog=XXXXXXXXX;
 UserID=XXXXX;Password=XXXXX;Encoding=UNICODE;" />

Now it works with both “localhost” and “127.0.0.1” (direct IP).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:17:49+00:00Added an answer on June 1, 2026 at 8:17 am

    Use a separate keyword for the port:

    Server=127.0.0.1;Port=...;User Id=...;Password=...;Database=...;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two git repositories: report.git (Master on remote location) cloned.git (Local) I lost
I have a website which I need to update, but I've lost the local
I have a free app published in Android market. I have lost the certificate
As the question says, I have a problem running the web app on local
I have lost somehow connection to the world of web programming six years back
I have setup a facebook app, configured it to point to my localhost and
I have lost my local backup of repositories..how can I pull all data of
I have lost an iPhone/iPad app due to a hard disk failure and I
If I lost/have no access to the private key associated with a distribution certificate:
I have lost my private key for iPhone Distribution Certificate during an OS upgrade.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.