.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem with connection to sql server : A connection was successfully established with the server, b

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
Hi all, I am trying to connect sql server using windows authentication . I am getting the fallowing when I try to establish a connection to sql server A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) Can any one tell me how to resolve this problem..

View Complete Post

More Related Resource Links

A connection was successfully established with the server, but then an error occurred during the pre

One of our IIS App pools serving a SharePoint site on one of the  Web Front End  went down suddenly at around 1pm today. Not entirely sure if  it's related yet or how, but we see a bunch of SQL errors from the Web server around that time as follows..    Event Type:         Error Event Source:     Windows SharePoint Services 3 Event Category:                Database Event ID:              5586 Date:                     8/24/2010 Time:                     12:57:21 AM User:                     N/A Computer:          xxxxx Description: Unknown SQL Exception -2146893056 occured. Additional error information from SQL Server is included below.   A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error

A connection was successfully established with the server, but then an error occurred during the log


Having encountered this error and not seeing a good answer on this (very old) question, I wrote a blog entry that describes an easy fix. It does involve candy and/or roses though.


"A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"



Connection problem while connecting from client to server.

Hello, i am trying to connect sql server 2005 express using c#.net 3.5. my connection string is "Server=.\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_naren; Trusted_Connection=Yes;" this is working fine when i am connecting to sql server from the local machine. When i am trying to connect from someother machine to server it is giving error like 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) i added previliges in add new administrator on SQL Server 2005 Surface Area Configuration . and i made changes on SQL Server 2005 Surface Area Configuration  page, on Database Engine --> Remote Connections -->Local and remote connections --> Using both TCP/IP and named pipelines. still same error i am getting from client machine i am using connection string as "Server=MyServer\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\db_naren.mdf;Database=db_nare; Trusted_Connection=Yes;" is there any thing i need to do to connect from client machine to server?please

A connection could not be made to the report server - Problem deploying an SSRS report from Business

I’m having trouble with what seems to be a common issue for people, regarding deployment of an SSRS report from Business Intelligence Development Studio. Unfortunately none of the solution I have seen posted here (and elsewhere) have been able to help me so far.   Two of my collegaues can both deploy with no problem, and I am using exactly the same Target destinations as them (TargetDataSourceFolder, TargetReportFolder, TargetServerURL).   I have posted the error message below, which from my basic understaning would indicate, I think, a security issue (perhaps something local to my PC, or user account)   Has anyone experienced this particular issue who might be able to help?   Best wishes, Jamie TITLE: Microsoft Report Designer ------------------------------ A connection could not be made to the report server http://turpin-net.turpin-bg.local/Reportserver. ------------------------------ ADDITIONAL INFORMATION: Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <HTML dir="ltr"> <HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; c

Bizare sql server connection problem...


HI, does anyone have any ideas...


I have created a BDC application in VS 2010, and installed it on the sharepoint 2010 server and I am at a loss to explain the behaviour.

I create an external list using my application as the data source. When I open the sharepoint site and access the list from a browser on the sharepoint server itself, everything works fine.

However, when I access the sharepoint site from a different machine, my BDC application reports a failure to open the SQL Server connection (Error 40  - could not open connection to SQL Server).

However, if I access the list from the server (which works), and then access the list from another machine, the remote machine now works, and will work for a short while before reverting to error 40. I am assuming that this is because the connection has been opened when I accessed the list on the server, and then the remote session is picking up the open connection in the pool, because if I then wait a couple of minutes for the connection to time out and try accessing the list again from a remote machine the connection then fails again.

It does not matter who I am logged in as (I have tried being a normal user on the server and an administrator on the remote machine, and visa versa), but the behaviour is consistent. Also, my connection string in my BDC application contains a

web.config connection string problem within VisualStudio 2010 to point to SQL Server 2008 R2 Develop


Hello All, I would appreciate any help with this.

I believe my problem exists within the web.config which already had code in it to connect to SQL Server Express 2008.

I uninstalled the SQL Server Express that came with Visual Studio 2010.

I installed SQL Server 2010 R2 Developer, and I'm able to connect via Management Studio and through Visual Studio's Server Explorer's Data Connections I am connected.

I did run aspnet_regsql.exe within the 4.0 folder in order to create the database with Microsoft Service Providers.

Here is the ServerName: USER-5529234649 

Here is the name of the DataBase:  StepByStepChapter9

Here is the name of the Connection within Visual Studio's Server Explorer's Data Connections:  user-5529234649.StepByStepChapter9.dbo

Here is the code I changed in the web.config:

<add name="ApplicationServices" c

Move to Win7 64-bit causing SQL Server Connection problem


We have a packaged VB App (Charm) originally developed in VS2003 then redeveloped in VS2005.

It uses a UDL file to point to the appropriate SQL Server and Database, using SQL OLEDB. 

It has been working fine on dozens of different installations both in-house and at customer sites for years.

We recently moved it to Windows 7.  It generally runs fine on 32-bit Win 7 but not on 64-bit, as it can't find its server.

In an effort to resolve the issue we then changed the app to get its connection string from a config file (charm.exe.config) stored in the program folder C:\Program Files (x86)\Charm.

On some 64-bit machines (But not all!) it doesn't work with this setup either.  We put a dialogue in to debug where it thinks its server should be found.  It is ignoring the .config file setting (which I will paste below) and instead getting the server name (NDS-5) from within the original binaries of charm.exe.  This is the server on which the app was compiled - but it doesn't even exist on my test network which is at a different office location.

The connection string settings currently used are:-

  <add name="Charm.My.MySettings.CallManagerSQLConnectionString"
   connectionString="Provider=SQLOLEDB.1;Data Source=AC-XP\ACXPSQL

The SQL Server 2008 connection problem


1. I built a database (I named it AZUESQLEXPRESS),the database Server is located on a computer in the corporate network,Its local ip is,connected to the router's(the global ip is

2. I use the router's DMZ,and set the DMZ ip as

3. Now I can use another computer(outside of company LAN)access the IIS servie on the computer,It’s successful.

4. I start the SQL Server Brower Service,and use:"ServerName:\AZUESQLEXPRESS,User:sa,Pd:Sccm2007"to connect to the database server.

5. On the local computer( ,It’s successful.But on the computer outside of company LAN ,it’s failed!I had started the SQL Server Brower and allow the remote connections.The Win7 firewall is also shutted down !

The Error Message:

????: ????????
------------------------------\AZUESQLEXPRESS ?????????


?????????????????????????????SQL Server 2005 ??????????????????????????SQL Server ???????????????????????????????????????????????? (provider: SQL ?????? ????????, error: 26 - ?????????????????????????????????????????) (Microsoft SQL Server????: -1)


sql server 2005 express and c# 2008 express connection problem



I can't get my C# app to connect to the DB.  I have tried numerous diff ways to connect.  The DB is there, I can get to it thru sql server, just not from C#.  I keep getting the following message -

Error accessing the database, a network-related or instance-specific error occurred while establishing a connection to sql server.  The sever 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.

All is on my home PC running XP Home Edition.


connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

A connection could not be made to the report server http://localhost/ReportServer.



  • I created a Report using Business Intelligence Studio. Its working working well, i can able to view records. But when i try to deploy the report an error occurs specifying that "A connection could not be made to the report server http://localhost/ReportServer. (Microsoft Report Designer)".
  • I open the IIS 7 and find out virtual directories "Reports" and "ReportServer" are available.
  • I check on the browser and type "http://localhost/reports".  I find the browser direct to this url: http://localhost/reports/Pages/Folder.aspx and find error specifying the following one:

         Error:The report server is not responding. Verify that the report server is running and can be accessed from this computer.

  • when i type http://localhost/reportmanager, i found the error:

    HTTP Error 404.0 - Not Found

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.


A connection that was expected to be kept alive was closed by the server.


When  i want to Call http://BDCRWSS/_vti_bin/BdcAdminService.svc Bdc AdminService in SharePoint Foundation  2010

the binding i use:

    <binding name="BasicHttpBinding_BusinessDataCatalogSharedService"
      closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
      sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
      hostNameComparisonMode="StrongWildcard" maxBufferSize="999999"
      maxBufferPoolSize="9999999" maxReceivedMessageSize="999999"
      messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
     <readerQuotas maxDepth="99" maxStringContentLength="999999" maxArrayLength="999999"
       maxBytesPerRead="999999" maxNameTableCharCount="999999" />
     <security mode="TransportCredentialOnly">
      <transport clientCredentialType="Ntlm" proxyCredentialType="None"
       <extendedProtectionPolicy policyEnforcement="Never" />
      <message clientCredentialType="Use

Connection Pooling To SQL Server

Hi Folks,

I'm a new SQL PFE and just encountered my first SharePoint installation at a customer site. (The first of many, I'm sure.) I ran some health checks on the SQL Server and noticed 600-700 user connections from the SharePoint account. The SharePoint admins and developers are novice to junior-level, and unfamiliar with connection pooling. I've never worked with SharePoint before and don't know what it's normal behavior is or how connections should be managed by SharePoint.

They indicated the SharePoint system is relatively new and only getting a small amount of use compared to what is expected soon.

SQL Server is handling the load well right now, but if the number of connections grows proportionally to the load, this will become a performance constraint.

1. Is this a normal number of connections for SharePoint?
2. If not, where can the SharePoint staff and myself find a thorough explanation of the principles of SharePoint connection pooling?

Thanks, JDL

FtpWebRequest - how to upload two files on FTP server using only one connection?

Hi I am using FtpWebRequest with option KeepAlive = true. When I upload first file I create ftp request object: FtpWebRequest result = (FtpWebRequest)FtpWebRequest.Create(""); I set KeepAlive = true and I do upload file. When I want upload second file I have to create new FtpWebRequest object using new URI FtpWebRequest result = (FtpWebRequest)FtpWebRequest.Create("");   I set KeepAlive = true and I do upload file. The problem is that I have to create new FtpWebRequest so I create new connection to FTP server (I have checked using netstat -b command that my application uses another port number for second file). How can I upload two files (or more) using only on FTP connection/session? Regards  

Server connection failure

Hello everyone, I get the following error message when I try to run the ItemFinder C# application: "An error has occured while establishing a connection to the server. When connecting to SQL Server 205, this failure may be caused by the fact that under the default settings SQL server doe not allow remote connections. (provider: Named Pipes Provider, erorr:40 - Could not open a connectio to SQL Server)" I have sucessfully installed SQL Server 2005 and AdventureWorks. Test connection for AdventureWorks in VS 2005 was succesfull. How can I overcome this problem? Many thanks in advance. Alex-Victor

Instance and Default connection properties on SQL Server 2005

We had a sql server fail and I have been having troubles.  I compared the connection properties on the server properties and noticed that multiple default settings are no longer set.  So I'm wondering if during the failure these could have some gotten flipped.  DB's that worked all of a sudden don't work and we had to migrate to a different instance.  I have never changed any of the setings below and wonder what impact they would have if I changed them back to the default of an installed instance? ansi warning is checked ansi padding is checked ANSI NULLS is checked arithmetic abort is checked quoted identified is checked No Count is checked concat null yields null is checked Could anyone tell me how clearing these checked options will impact my db?   -- Paul Bergson MVP - Directory Services MCITP: Enterprise Administrator MCTS, MCT, MCSE, MCSA, Security+, BS CSci 2008, Vista, 2003, 2000 (Early Achiever), NT4 http://www.pbbergs.com    Twitter @pbbergs Please no e-mails, any questions should be posted in the NewsGroup This posting is provided "AS IS" with no warranties, and confers no rights.

SQL Server Configuration Manager: Connection to target machine could not be made in a timely fashion

I have a SQL Server 2005 box that was moved from a domain environment to a non-domain environment and was never dropped from its original domain before moving over.  Subsequently a new domain was created at the data center this SQL Server box now resides in.  The machine was dropped from its old domain and joined to the new one.   All the while the service accounts were set to the local admin account.  When I tried to start the Configuration Manager I got the message "Connection to target machine could not be made in a timely fashion.".  I read some blog entries and tried changing all the service accounts to Local System and the error message still came up.   All of the SQL Server services run fine.  It is just this management console that I cannot open.  I wasn't with this employer when this box was moved to the data center so I do not know if it worked prior and there isn't anyone here that could give me its history.   Any help would be appreciated.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend