У меня (начинающего программиста) небольшая проблема!
Создал проэкт VB.NET, базу на MS SQL, в моём проэкте в файле
Web.config не могу правильно прописать строчку:
<add key="ConnStr" value="Server=localhost;uid=**; pwd=***; database=students" />
(** - мой логин при входе в XP
*** - мой пароль при входе в XP
вместо звёздочек уже всё перепробывал, неберёт и всё)
выдаёт ошибку:
Server Error in '/aspNET/Job1' Application.
--------------------------------------------------------------------------------
Login failed for user '**'.
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 '**'.
Source Error:
Line 39: cmd = New SqlCommand(str, conn)
Line 40: adpt = New SqlDataAdapter(cmd)
Line 41: adpt.Fill(ds, "info_student")
Line 42: Session("tab") = ds.Tables("info_student").DefaultView
Line 43: DataGrid1.DataSource = Session("tab")
Source File: C:\Inetpub\wwwroot\aspNET\Job1\WebForm1.aspx.vb Line: 41
Stack Trace:
[SqlException: Login failed for user '**'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object 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, String srcTable)
Job1.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\aspNET\Job1\WebForm1.aspx.vb:41
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573