Getting Error While running the page...

Last post 11-02-2009 7:49 PM by vinz. 4 replies.

Sort Posts:

  • Getting Error While running the page...

    10-30-2009, 7:46 AM
    • Member
      1 point Member
    • laxmi.m
    • Member since 11-20-2008, 10:27 AM
    • Posts 11

    Hi Experts,


    I am new to this topic. Actually, While run the page , getting error like below..


    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


    Can anyone tell me the reason..


    is there any settings orproperties i need to mention?

    Reply as early as possible...

    Thanks in Advance,

    Laxmi.M.


  • Re: Getting Error While running the page...

    10-30-2009, 8:42 AM
    • Contributor
      4,448 point Contributor
    • stanly
    • Member since 02-09-2009, 4:35 AM
    • Chennai
    • Posts 1,006

    Check your local server... give correct name.... still error?

     post your connection string code...

    sample connection string...

    <add name="MyConnectionString" connectionString="Server=MyPCName\SQLEXPRESS;Initial Catalog=MyDateBase;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>


    Follow me on Twitter Stanly


    Highlight Search Keyword in datalist

    If this post was useful to you, please mark it as answer
  • Re: Getting Error While running the page...

    11-02-2009, 4:43 AM

    laxmi.m:

    Hi Experts,


    I am new to this topic. Actually, While run the page , getting error like below..


    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)


    Can anyone tell me the reason..


    is there any settings orproperties i need to mention?

    Reply as early as possible...

    Thanks in Advance,

    Laxmi.M.


     

     

    Hi Laxmi.M,

    According to the error message, there are two main reasons.

    First, your SQL Server didn't deploy correctly. Please check out your SQL Server's username and password for logining.

    Second, you may not build your connection string properly. You can get help to learn how to do it from the site below.

    http://msdn.microsoft.com/en-us/library/ms254978.aspx

     

    By the way, your issue is not belong to this forum (It's a Webparts Forum here). If you post your issue to a correct forum, you will get more helpful suggestion.

    This forum link could help you more:Data Access.

     

    Hope it helpful for you.

    Hope it helps.
    I'm always ready for your reply.

    Thank you for thinking of ASP.NET Forums,
    Jerry Weng - MSFT

    If the post helps you, please click the Mark As Answer or the Mark As Not Answer if not.
  • Re: Getting Error While running the page...

    11-02-2009, 6:26 AM
    • Participant
      866 point Participant
    • Babunareshnarra
    • Member since 07-12-2009, 7:10 AM
    • Hyderabad
    • Posts 179

    Probably the connection string could be wrong .

    This error usually comes when the sever instance is not properly specified or the service is not turned on on the server.

    I think this will solve the problem


    Regards

    Babu Naresh Narra

    Remember to click “Mark as Answer” on the post If you get answer from my post(s) !
  • Re: Getting Error While running the page...

    11-02-2009, 7:49 PM
    Answer
    • All-Star
      91,698 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,769
    • TrustedFriends-MVPs

    Also,be sure that you have installed Sql Express in your machine for you to able to use WebParts personalization.

    Or If you are accessing sql server in different machine then be sure that Remote connection is enabled... Take a look at this

    http://support.microsoft.com/kb/914277 

    Or You have to enable TCP/IP in SQL Server Configuration Manager, enable remote connections in SQL Server Surface Area Configuration, and then restart SQL Server (assuming you have no firewalls).

    PS: for more information about remote connection just google for it... 


    "Code,Beer and Music ~ my way of being a programmer"

Page 1 of 1 (5 items)