locked
Error in 3-Layer Project RRS feed

  • Question

  • Hi

    I have a 3-Layer project, I want to add a user. I use Connection String in web.config and it seems that everything is ok

    but when i run website i get this error.

     What should I do???!!!

    :(((((

    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)

    • Moved by Bob Beauchemin Tuesday, July 23, 2013 8:24 AM Moved to forum for client-side ADO.NET questions for best response
    Sunday, July 21, 2013 8:37 PM

All replies

  • Sounds like you need to configure SQL Server to allow remote connections. You'd use SQL Server Configuration Manager to do this. SQL Express, for example, isn't configured to allow remote connections by default.

    I'm going to move the question to a forum for ADO.NET SqlClient for best results, and if you're sure that you have SQL Server configured correctly, it might be best to repost to the ASP.NET forums (I can't move it there directly).

    Cheers, Bob

    Sunday, July 21, 2013 10:06 PM
  • Remote connection is ok.

    Bob Thanks for your advice but I can't find asp.net forum.

    Monday, July 22, 2013 7:43 AM
  • They're here: http://forums.asp.net/. There's a bunch of them, separate from MSDN and TechNet forums, which I why I can't move things there. Don't ask me why they need to be totally separate. :-)

    Cheers, Bob


    Monday, July 22, 2013 8:02 PM
  • Hi Atieh,

    This forum is to discuss SQL Server related questions, we will help to troubleshoot the issue from SQL Server side. Regarding to the ASP.NET question, please post them to ASP.NET forum.

    Please install SQL Server Management Studio and check whether we can connect to SQL Server via it. If not, please refer to the steps on the following document to troubleshoot the connection issue.

    Steps to troubleshoot SQL connectivity issues
    http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx

    Microsoft® SQL Server® 2008 Management Studio Express
    http://www.microsoft.com/en-in/download/details.aspx?id=7593


    Allen Li
    TechNet Community Support

    Tuesday, July 23, 2013 2:47 AM
  • Thanks

    :))))

    Tuesday, July 23, 2013 9:09 AM