Hi;
Thanks for your attention.I have not any problem with windows
application.the exact message that I recieve in web application is this:
(some description is below)
Server Error in '/Temp' Application.
--------------------------------------------------------------------------------
Login failed for user 'sa'.
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: Login failed for user
'sa'.
Source Error:
Line 30: if(!IsPostBack)
Line 31: {
Line 32: sqlConnection1.Open();
Line 33: sqlDataAdapter1.Fill(dataSet11);
Line 34: DataGrid1.DataBind();
Source File: c:\inetpub\wwwroot\temp\webform1.aspx.cs Line: 32
Stack Trace:
[SqlException: Login failed for user 'sa'.]
System.Data.SqlClient.ConnectionPool.CreateConnection()
System.Data.SqlClient.ConnectionPool.UserCreateRequest()
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
Temp.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\temp\webform1.aspx.cs:32
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This occurs when I use local sql server.when I use other sql server on the
network I give "server is not exist" message.I follow this steps:
1) I create a sqlconnection 2)I set a sql statement in a data adapter
3)generate a data set 3)in page load event I add above codes.
Jacek Stawicki said:
Give us more data. Some line with error description, line with code etc.
There are many possible reasons.