I'm getting the error (below) when run on my production website. The app runs fine on my development machine. As a result, am stumped as to how to debug it.The SaeWeb project is referencing my SaeBOL project for business objects.
On my dev machine, I can see that my Global.asax.vb is creating a DataSource correctly with "" key and correct connectionstring:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
DataLayer.DataSources.Add(New SqlDataSourceItem("", _
"Data Source=tcp:sql2k513.discountasp.net;Initial Catalog=SQL2005_386891_sae; User ID=*****; Password=*****"))
End Sub
My SchoolBO has a "" as its DataSourceKey.
Much to my amazement, when run on my development machine this web page is actually connecting the the production SQL database at the web host.
Not sure what might be missing in the installed version on the website. Any help much appreciated.
-- Larry (using VS2008 and .NET 3.5 build target)
Server Error in '/' Application.
--------------------------------------------------------------------------------
The DataSourceKey [] is not defined.
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: MicroFour.StrataFrame.Data.DataLayerException: The DataSourceKey [] is not defined.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin
and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[DataLayerException: The DataSourceKey [] is not defined.]
MicroFour.StrataFrame.Data.DataLayer.Create(BusinessLayer BusinessObject, ISynchronizeInvoke SyncObject, Boolean CheckDesignTime) +271
MicroFour.StrataFrame.Business.BusinessLayer.get__DataLayer() +79
[DataLayerException: An error occurred while creating a new DataLayer for the business object.]
MicroFour.StrataFrame.Business.BusinessLayer.get__DataLayer() +149
MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement) +15
SaeBOL.SchoolBO.FillAll() +13
SaeWeb.SchoolForm.Page_Load(Object sender, EventArgs e) +46
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433