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

  • Home
  • SEARCH
  • 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 8359497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:09:46+00:00 2026-06-09T11:09:46+00:00

I already asked this question before, but without any good response, my problem is

  • 0

I already asked this question before, but without any good response,
my problem is that I have a local database (aspnetdb.mdf) in my app_data folder, here is the connection string in the web.config :

<add name="ApplicationServices" 
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" 
     providerName="System.Data.SqlClient" />

so my site works fine in my local iis server, but when i put the site in my host server, I get this error message :
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).

In the other server I have sql server 2008 (the remote connection is accepted and i have the same instance name SQLEXPRESS). I really tried everything that I can but without any good results. I will really appreciate your help, thx.

  • 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-09T11:09:49+00:00Added an answer on June 9, 2026 at 11:09 am

    This format indicates a local connection:

    .\SQLEXPRESS
    

    From another server, you’ll need to specify a server name or IP address, e.g.:

    192.168.1.205\SQLEXPRESS
    YOURMACHINE\SQLEXPRESS
    

    You’ll also need to validate that the instance is SQL Server Express. From your other nearly identical question it looks like a default instance.

    You should also stop using this silly user instance / attachDbFilename technique. Attach your database to the instance properly, then reference the logical database name using Initial Catalog=aspnetdb; in your connection string. This user instance feature was deprecated for multiple reasons, and this is certainly one of them.

    Of course there may be other network issues that will prevent this, e.g. if the server is in a different domain, there are firewall settings interfering, etc. But your other server is never going to be able to access your machine using a dot for the server name.

    EDIT providing baby steps because obviously my advice is not being followed. Assuming you have actually attached the aspnetdb database on the new server, try this please:

     connectionString="data source=192.168.85.124\SQLEXPRESS;
       Integrated Security=SSPI;
       Initial Catalog=aspnetdb;" 
    

    If you aren’t using SQL Express named instance after all, try:

     connectionString="data source=192.168.85.124;
       Integrated Security=SSPI;
       Initial Catalog=aspnetdb;" 
    

    For SQL authentication use the same username/password you use in Management Studio:

     connectionString="data source=192.168.85.124;
       User ID=username; Password=password;
       Initial Catalog=aspnetdb;" 
    

    This is troubleshooting 101 stuff. If you still can’t get this to work, you may have to hire a consultant for 10 minutes to fix it for you since it’s impossible to figure out what you’ve done and why you can’t get it to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've already asked this question on several forums, but without any good explanation of
Yes, I have already asked this question, but the problem is much more specific.
I know that this question had already been asked a couple of times before,
I already asked this question but at that time I tought that the refresh
I am sorry I have already asked this question on Superuser, but nobody answers
Searching here I found that this question was already asked , but I think
I believe lot of people already asked this question before, but i kept getting
I have asked this question before - but I have spent some time thinking
I apologize if this question was asked already before but I could not find
Probably this question was already asked before, but my google-fu and SO-Search did not

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.