<databases> <add key="Northwind\Connection" value="server=(local);Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind" /> </databases>I then moved onto building the Web Forms - C# Jump Start application and used the following database key in my web.config file:
<databases> <add key="Northwind\Connection" value="server=(local);Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind" /> <add key="Northwind\DataAccessClass" value="DataAccessSql" /> </databases>During design time, the wizards are able to connect to the data tables and display the appropriate fields for BindingSourceMember selections. However, at runtime, I receive the following error when a bizobj method attempts to access data.
Server Error in '/Order System Web CSharp' Application.
--------------------------------------------------------------------------------
Login failed for user 'DEVELOPER\ASPNET'.
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 'DEVELOPER\ASPNET'.
Source Error:
Line 28: public DataSet GetOrdersByCustomerID(string customerID)
Line 29: {
Line 30: return this.GetDataSet("SELECT * From Orders WHERE CustomerID = '" +
Line 31: customerID + "'");
Line 32: }
Source File: C:\MM .NET Jump Start\Order System Business Objects CSharp\Orders.cs Line: 30
Stack Trace:
[SqlException: Login failed for user 'DEVELOPER\ASPNET'.]
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)
OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill)
OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams)
OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey, IDbDataParameter[] dataParams)
OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName, String databaseKey)
OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command, String tableName)
OakLeaf.MM.Main.Business.mmBusinessObject.GetDataSet(String command)
Acme.OrderSystem.Business.Orders.GetOrdersByCustomerID(String customerID) in C:\MM .NET Jump Start\Order System Business Objects CSharp\Orders.cs:30
Acme.WebOrderSystem.Web.UI.CustomerOrders.GetCustomerOrders(String customerID) in c:\inetpub\wwwroot\order system web csharp\customerorders.aspx.cs:76
Acme.WebOrderSystem.Web.UI.CustomerOrders.btnGetOrders_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\order system web csharp\customerorders.aspx.cs:66
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Can someone get me back on track?
Thanx,
Neil