PLEASE HELP;Server Error in '/sample' Application: System.Data.SqlClient.SqlException

Hello,
PLEASE HELP
I am a beginner in .NET. I wanted to know why this error exists.
i want to display the tables in server in my web application remotly.
i gave a windows server authentication and my connection through the data adapter.where "source name=DEVSERVER"
i wrote the following command in the load_page.

sqlDataAdapter1.Fill(dataSet11);
DataGrid1.DataBind();


Server Error in '/sample' Application.
--------------------------------------------------------------------------------

SQL Server does not exist or access denied.
Description: 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.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:


Line 100: private void Button1_Click(object sender, System.EventArgs e)
Line 101: {
Line 102: sqlDataAdapter1.Fill(dataSet11);
Line 103: DataGrid1.DataBind();
Line 104:


Source File: c:\inetpub\wwwroot\sample\webform1.aspx.cs Line: 102

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
sample.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\sample\webform1.aspx.cs:102
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


`````````````````````````````````````````````````` `````````````````````````````````````
 
"SQL Server does not exist or access denied" usually means your connection string is wrong... either the server address, login or password, or you may even have the database name wrong.

Try using an SQL tool like Enterprise Manager, if you have it, to connect to the database remotely to test your connection string.
 
Back
Top