title: A connection was successfully established with the server, but then an error occurred - provider: TCP Provider, error: 0
body: <p>My web site was working flawless in the <strong>old Host</strong>, But now i Moved to a <strong>new host</strong></p>
  
  <p><strong>Please pay attention:</strong> The <strong>Old host</strong> was a <strong>VPS</strong> on <strong><em>the same host</em></strong></p>
  
  <p>So i'v stoped paying him and <strong>now</strong> i'm hosting on <strong>the same  host</strong> as a <strong>shared host</strong>.</p>
  
  <p>So I moved all the files in to the <strong>root folder</strong> and config the SQL details in the <strong>Web.config</strong></p>
  
  <p>I can't load the site for some reason.
  i got Errors all the time.
  <strong>PLEASE HELP ME!</strong></p>
  
  <p><em>After I Fixed my Ajax problem.. Here</em> -><a href="https://stackoverflow.com/questions/7723489/could-not-load-file-or-assembly-system-web-extensions-version-1-0-61025-0-error/7723731#7723731">Could not load file or assembly &#39;System.Web.Extensions, Version=1.0.61025.0 Error</a></p>
  
  <p><strong>I run into another problem..</strong></p>
  
  <p><strong>This is my Sql Server Details:</strong></p>
  
  <blockquote>
    <p>Server name : WEBSQL2K5</p>
    
    <p>Server version :  Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) </p>
    
    <p>Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)</p>
    
    <p>myLittleAdmin (for SQL Server and MSDE) v.2.7 r.118</p>
  </blockquote>
  
  <p><strong>This is the connection string</strong></p>
  
  <pre><code>&lt;connectionStrings&gt;
          &lt;add name="Con" connectionString="Data Source=localhost;Initial Catalog=DBname;user=DBusr;password=DBpass;" providerName="System.Data.SqlClient"/&gt;
      &lt;/connectionStrings&gt;
  </code></pre>
  
  <h1>Server Error in '/' Application.</h1>
  
  <pre><code> A connection was successfully established with the server, but then an
   error occurred during the login process. (provider: TCP Provider,
   error: 0 - The specified network name is no longer available.)
  </code></pre>
  
  <p><strong>Description:</strong> <em><code>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</code></em> </p>
  
  <p><strong>Exception Details:</strong> <code>System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)</code></p>
  
  <p><strong>Source Error:</strong> </p>
  
  <pre><code>Line 25032:            this.Adapter.SelectCommand.Parameters[0].Value = ((int)(id));
  Line 25033:            main_ds.TXTDataTable dataTable = new main_ds.TXTDataTable();
  Line 25034:            this.Adapter.Fill(dataTable);
  Line 25035:            return dataTable;
  Line 25036:        }
  </code></pre>
  
  <p><strong>Source File:</strong> <code>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cf53bee4\ce0ba883\App_Code.vago_96o.15.cs    Line: 25034</code></p>
  
  <p><strong>Stack Trace:</strong> </p>
  
  <pre><code>[SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)]
     System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
     System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
     System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +527
     System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj) +359
     System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket() +88
     System.Data.SqlClient.TdsParserStateObject.ReadBuffer() +39
     System.Data.SqlClient.TdsParserStateObject.ReadByte() +20
     System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +107
     System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
     System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
     System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
     System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
     System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
     System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
     System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
     System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
     System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
     System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
     System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
     System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
     System.Data.SqlClient.SqlConnection.Open() +122
     System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState&amp; originalState) +31
     System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
     System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
     System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115
     main_dsTableAdapters.TXTTableAdapter.GetDataByID(Int32 id) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cf53bee4\ce0ba883\App_Code.vago_96o.15.cs:25034
     _Default.InitSeo() in \\filer\sites\NV355601\www.picit.co.il\www\default.aspx.cs:36
     _Default.Page_Load(Object sender, EventArgs e) in \\filer\sites\NV355601\www.picit.co.il\www\default.aspx.cs:28
     System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
     System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
     System.Web.UI.Control.OnLoad(EventArgs e) +99
     System.Web.UI.Control.LoadRecursive() +50
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
  </code></pre>
  
  <p><strong>Web.config:</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;appSettings&gt;
          &lt;add key="SiteAddress" value="http://www.picit.co.il/" /&gt;
          &lt;add key="SSLSiteAddress" value="https://bonsite-secure.co.il/picit/" /&gt;
  
          &lt;add key="EMAIL_HOST" value="mail.barak.net.il"/&gt;
          &lt;add key="EMAIL_CONTACT_NAME" value="PicIt"/&gt;
          &lt;add key="EMAIL_USER" value="bonsite-barak.net.il"/&gt;
          &lt;add key="EMAIL_PASS" value="013013"/&gt;
          &lt;add key="MASTER_USERNAME" value="bonsite"/&gt;
          &lt;add key="MASTER_PASSWORD" value="master123#"/&gt;
  
          &lt;add key="FCKeditor:UserFilesPath" value="~/Up/Main/"/&gt;
          &lt;add key="FCKeditor:BasePath" value="~/Controls/FCKeditor/"/&gt;
      &lt;/appSettings&gt;
      &lt;connectionStrings&gt;
          &lt;add name="Con" connectionString="Data Source=localhost;Initial Catalog=DBname;user=DBusr;password=DBpass;" providerName="System.Data.SqlClient"/&gt;
      &lt;/connectionStrings&gt;
      &lt;system.web&gt;
          &lt;globalization culture="he-IL" uiCulture="he-IL"/&gt;
          &lt;sessionState mode="InProc"/&gt;
          &lt;customErrors mode="Off"/&gt;
          &lt;identity impersonate="true"/&gt;
          &lt;authentication mode="Windows"/&gt;
          &lt;httpRuntime maxRequestLength="22000"
  minFreeThreads="16"
  executionTimeout="500"
  useFullyQualifiedRedirectUrl="false"
  minLocalRequestFreeThreads="4"
  appRequestQueueLimit="1000" /&gt;
          &lt;pages theme="Front"&gt;
              &lt;namespaces&gt;
                  &lt;add namespace="Website"/&gt;
              &lt;/namespaces&gt;
              &lt;controls&gt;
                  &lt;add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagPrefix="asp"/&gt;
                  &lt;add tagPrefix="Upload" namespace="Brettle.Web.NeatUpload" assembly="Brettle.Web.NeatUpload"/&gt;
                  &lt;add tagPrefix="fck" namespace="FredCK.FCKeditorV2" assembly="FredCK.FCKeditorV2"/&gt;
                  &lt;add tagPrefix="swf" tagName="movie" src="~/Controls/swf.ascx"/&gt;
                  &lt;add tagPrefix="Btn" tagName="Friend" src="~/Controls/btn_friend.ascx"/&gt;
                  &lt;add assembly="Bound" namespace="CustomControls" tagPrefix="asp"/&gt;
                  &lt;add assembly="skmValidators" namespace="skmValidators" tagPrefix="Vld"/&gt;
  
                  &lt;add tagPrefix="CC" tagName="Upload" src="~/Controls/upload.ascx"/&gt;
              &lt;/controls&gt;
          &lt;/pages&gt;
          &lt;compilation debug="true"&gt;
              &lt;assemblies&gt;
                  &lt;add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
                  &lt;add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
              &lt;/assemblies&gt;
          &lt;/compilation&gt;
          &lt;httpModules&gt;
              &lt;add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload"/&gt;
              &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;
          &lt;/httpModules&gt;
          &lt;httpHandlers&gt;
              &lt;remove verb="*" path="*.asmx"/&gt;
              &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;
              &lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/&gt;
              &lt;add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/&gt;
          &lt;/httpHandlers&gt;
      &lt;/system.web&gt;
      &lt;system.webServer&gt;
          &lt;modules&gt;
              &lt;add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" preCondition="managedHandler"/&gt;
              &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler"/&gt;
          &lt;/modules&gt;
          &lt;handlers&gt;
              &lt;add name="ScriptResource.axd_GET" path="ScriptResource.axd" verb="GET" type="Microsoft.Web.Handlers.ScriptResourceHandler" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
              &lt;add name="ScriptResource.axd_GET,HEAD" path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
              &lt;add name="*.asmx_*" path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0"/&gt;
          &lt;/handlers&gt;
          &lt;validation validateIntegratedModeConfiguration="false"/&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>