Results 1 to 6 of 6

Thread: A network-related or instance-specific error occurred while establishing a connection

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2016
    Posts
    11

    A network-related or instance-specific error occurred while establishing a connection

    Hello there,

    I have been programming in visual studio for 10 years+. One of my websites loads just fine when I hit the debug button. I can go to the login page and login to the database
    I have another site that is not allowing me to login, and it's providing this message which I'm trying to figure out. I have dealt with this in the past, but I believe my previous resolution was to turn on the sql server in the sql configuration manager. My server shows as running.

    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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    I have checked my sql server configuration manager and it is ON. Here are my connection strings:

    <connectionStrings>
    <add name="sqlConnectionString" connectionString="Connect Timeout=8; Initial Catalog=DB_132067_prospect; Data Source=DESKTOP-UKV35UH;integrated security=true;" providerName="System.Data.SqlClient"/>
    <add name="sqlConnectionString2" connectionString="Connect Timeout=8; Initial Catalog=DB_132067_prospect; Data Source=DESKTOP-UKV35UH;integrated security=true;" providerName="System.Data.SqlClient"/>
    </connectionStrings>


    When I start this in debugger, the home page loads, and on the home page there are numbers which are obtained from the database. So the connection does work on the home page and numbers are being pulled from the database. Its the login page this is generating this error. So this means that the above connection string is correct!

    Does someone know why this might happen?
    Last edited by sking; Jan 21st, 2023 at 06:59 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width