SQL server- network related or instance-specific error happened while connection establishing

 

Instance-specific or network related error happening while connecting to SQL server

 

Please check the issue by following these steps:

 

1. Check the connection string is correct.

<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=***;Initial Catalog=***;User Id=***;Password=***;" providerName="System.Data.SqlClient"/>
</connectionStrings>

2. Please make sure that your asp.net membership tables and roles are created to your remote database if you are using asp.net membership and profile

You can run the aspnet_regsql.exe tools, which is located in the
[drive:]\WINDOES\Microsoft.NET\Framwrok\v4..0.30319

3. Add a <clear/> element as the first element under the connection strings element to ensure no strings are being inherited.

and after add connectin string named LocalSqlServer, which is in the Providers section under AspNetSqlMembershipProvider

<connectionStrings>
<clear />
<add name="ConnectionString" connectionString="Data Source=***;Initial Catalog=***;User Id=***;Password=***;" providerName="System.Data.SqlClient" />
<add name="LocalSqlServer" connectionString="Data Source=***;Initial Catalog=***;User Id=***;Password=***;" providerName="System.Data.SqlClient" />
</connectionStrings>

4. Please check 'defaultProvider' and 'connectionStringName' for membership and profile in web.config.

<membership defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="ConnectionString"
applicationName="SampleApplication"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="true" />
</providers>
</membership>

<profile defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConnectionString"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" />
</providers>

</profile>


 

  • programming error, error solution, SQL instance error, SQL network error, SQL connection error
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

OleDB connection string examples

OleDB connection string examples MS Access (Jet) "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA...

Do you allow custom COM components?

Do you allow custom COM components? We are not offering to install the custom COM components...

Error when accessing a WCF services

Error when accessing a WCF services Error when accessing a WCF service: "IIS specified...

How to cache static contents to client with UseMaxAge?

You can consider to caches static contents to the client with UseMaxAge if your website has too...

Dou you support Crystal Reports?

Yes, We do support Crystal Reports in all our Windows Servers.

Powered by WHMCompleteSolution