Problem with Stratframe ASP.Net Web Example


Author
Message
John Davies
John Davies
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 136
Hi,

I wonder if you can help ... I was working through your Web sample ... and now I keep getting the error below when I click on a page that access the Strataframe database, Remote connections are enabled.  Can you help ?  I have SQL 2000 installed and SQL Express.  In my global asax file I added the connection string

DataLayer.DataSources.Add(new SqlDataSourceItem("", "Server = ./SqlExpress;Database=StrataFrameSample;Integrated Security=SSPI"));

.... although I don't believe I need it.  I have also successfully connected to the database using the Database connection Tool.

Error
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
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: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

Line 127:Line 128://-- Execute the commandLine 129:Customers.FillDataTable(loCommand);Line 130:Line 131://-- Stop the watch


Source File: e:\Program Files\MicroFour\StrataFrame\CSharp Samples\Web Sample\SearchCustomers.aspx.cs    Line: 129

Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)] 


Replies
John Davies
John Davies
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 136
Hi Trent,

I've posted the error below ... I rebuilt the solution and got no errors.  All I got were warnings about XML comments.

Server Error in '/Web Sample' Application.
--------------------------------------------------------------------------------

The business object 'Customers' could not be found on this page.
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.InvalidOperationException: The business object 'Customers' could not be found on this page.

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:


[InvalidOperationException: The business object 'Customers' could not be found on this page.]
   MicroFour.StrataFrame.UI.Web.BasePage.GetBusinessObject(String Name) +124
   MicroFour.StrataFrame.UI.Web.WebBusinessBindingSource.GetBusinessObject() +38
   MicroFour.StrataFrame.UI.Web.WebBusinessBindingSource.GetView(String viewName) +29
   System.Web.UI.DataSourceControl.System.Web.UI.IDataSource.GetView(String viewName) +7
   System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +226
   System.Web.UI.WebControls.DataBoundControl.GetData() +4
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +57
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   System.Web.UI.WebControls.GridView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +21
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +292
   System.Web.UI.Page.FindControl(String id) +39
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +234
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I ran the sample again that comes with the framework and I just can't get it to fail.  So try this.  I have attached the sample that I test, extract it to a new location and just open up the global.asax and change your connection string to meet your needs.  Then just press Ctrl+F5 and run the web site.  It should work.

I did go ahead and upgrade the solution to a 2008 solution so it is expected VS2008.  If you do not have VS2008 let me know and I will create a VS2005 solution out of this.

Attachments
CSharpWebSample.zip (139 views, 202.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
John Davies - 17 Years Ago
Ivan George Borges - 17 Years Ago
Trent L. Taylor - 17 Years Ago
John Davies - 17 Years Ago
StrataFrame Team - 17 Years Ago
John Davies - 17 Years Ago
Trent L. Taylor - 17 Years Ago
John Davies - 17 Years Ago
Trent L. Taylor - 17 Years Ago
John Davies - 17 Years Ago
Trent L. Taylor - 17 Years Ago
John Davies - 17 Years Ago
John Davies - 17 Years Ago
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search