I am unable to connect SQL server

Discussion in 'Getting started' started by Agha, Mar 26, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. <add name="DialnamesEntities" connectionString="metadata=res://*/DialNamesModel.csdl|res://*/DialNamesModel.ssdl|res://*/DialNamesModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_806971_namecalling;User ID=SQL2008R2_806971_namecalling_user;Password=shujaa&quot;" providerName="System.Data.EntityClient" />

    Any help will be very much appriciated.
    Best regards
    :D
     
  2. Like this, just replace the temp password below with your site's PW:

    <connectionStrings>
    <clear/>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_806971_namecalling;User ID=SQL2008R2_806971_namecalling_user;Password=Your_PW_here" providerName="System.Data.SqlClient"/>
    <add name="DialnamesEntities" connectionString="Data Source=tcp:sql2k804.discountasp.net;Initial Catalog=SQL2008R2_806971_namecalling;Persist Security Info=True;User ID=SQL2008R2_806971_namecalling_user;Password=Your_PW_here" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
  3. This is news to me that setting a connection string in web.config is programming. I received an email from discoutasp.net that they can’t help with connection string because it is programming.
    I have 2 directories under the server _database and bin. I placed my database inside _database and in bin I placed a dll. At the root I placed my service (DialNameService.svc)
    On CMD window
    sqlcmd -S sql2k804.discountasp.net -U SQL2008R2_806971_namecalling_user -P Given_Password
    and it shows 1> which implies I can connect with no problem.
    My localhost also works fine, no problem.
    <clear />
    <remove name="DialnamesEntities" />
    <add name="DialnamesEntities" connectionString="Data Source=sql2k804.discountasp.net;Initial Catalog=SQL2008R2_806971_namecalling;User ID=SQL2008R2_806971_namecalling_user;Password=Given_PassWord;" />

    On I looked all over, but at the end my Service never worked on remote server.
    My service exposed to a function FindTelephones
    DialNamesServiceClient proxy = new DialNamesServiceClient();
    string[] list = proxy.FindTelephones("SomeName");

    The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

    Any help will be very much appreciated.
     
  4. ...I'm the main person that helps with that in these forums.
    Hundreds of times I have even logged into customer sites to do this for them.

    I am willing to help, but first I need to ask what you meant by "I placed my database inside _database"

    Are you referring to an Express DB?
     
  5. mjp

    mjp

    Support staff isn't allowed to do anything to your web.config, or any other file in your account, nor can they provide specific configuration information via the helpdesk, outside what is available in the Knowledge Base or Control Panel.

    That policy is in place for a lot of reasons, one of which is to prevent any liability or responsibility for a customer's site operation ("My site worked fine until you did <whatever>, now it doesn't work!"). Another reason is there is a fine line between hands-on-your-files support and development assistance, and we have to keep that line very clear. The simplest way to do that is to decline to touch customer's files.

    If it seems counterproductive at times, I apologize, but that's how we've got to do it.
     
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    You might want to look at the following article:

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

    The error doesn't appear to be related to your connection string, but you can always double check that your code is referencing it correctly from your web.config file.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page