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 8389147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:38:47+00:00 2026-06-09T18:38:47+00:00

I have a problem with my connection string and I couldn’t find anything on

  • 0

I have a problem with my connection string and I couldn’t find anything on the web that could help me. So I have a test website on which I connect to a database which is not on the same server. There it all works fine, the data is being read correctly and the connection is successful.

Now when I try the same on a website which is on the same server than the database it doesn’t work. So I figured I can’t just connect to the database server as I would from a different server if I am already on that server like this:

<connectionStrings>
    <add name="nameOfConnString" connectionString="Data Source=serverName;Initial Catalog=databaseName;User ID=userName;Password=password" providerName="System.Data.SqlClient" />
</connectionStrings>

Could anyone help me with that?

If you need more information just ask please.

Thanks in advance!

[edit]

Oh I forgot…this is the error message I get:

A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 – Could not open a connection to SQL Server)

  • 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-09T18:38:48+00:00Added an answer on June 9, 2026 at 6:38 pm

    Try localhost instead of server name

    <connectionStrings>
        <add name="nameOfConnString" connectionString="Data Source=localhost;Initial Catalog=databaseName;User ID=userName;Password=password" providerName="System.Data.SqlClient" />
    </connectionStrings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a third party application that requires a 'POP 3 connection string'. I'd
I have problem that says The specified named connection is either not found in
I have a DB connection string stored in web.config. I am creating a common
I have a strange problem on ipv6 connection. I write down a simple client
I have a problem with the binding of the below parameter. The connection works
My problem involves checking if I have a valid database connection before reading from
I have run into a little problem. I am connecting to a webservice that
I have posted this yesterday, I didn't get the the answers that could solve
I have this connection string <add name=ApplicationServices connectionString=Data Source=local;Initial Catalog=mycatalog;Integrated Security=True providerName=System.Data.SqlClient/> The problem
I have started writing an application that gets in a certain website and gets

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.