lynn tan

lynn tan

  • NA
  • 12
  • 0

problem with accessing web service

Jun 20 2006 1:31 AM
hi i have problem accessing my web service.. the error message is as follows System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Service1.GetUserInfo(String id, String pwd) in e:\projects\aspnet_client\WebService\App_Code\Service.cs:line 50 --- End of inner exception stack trace -- and my coding is as follows private void BtnLogin_Click(object sender, EventArgs e) { CustomerMS.localhost.Service1 cms = new CustomerMS.localhost.Service1(); ds = cms.GetUserInfo(txtUser.Text.Trim(), txtPwd.Text.Trim()); -> error comes from this line. uid = txtUser.Text.Trim(); pwd = txtPwd.Text.Trim(); if ((int)ds.Tables["User Information"].Rows[0].ItemArray[0] > 0) { this.Hide(); frmMain main = new frmMain(); main.Show(); } else { MessageBox.Show("You didnt enter the right User ID or Password", "Invalid User ID or Password", MessageBoxButtons.OK,MessageBoxIcon.Error); } someone please help me...