Problem with Stratframe ASP.Net Web Example


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
John,

Sorry, I missed this post Blush.  I think that this could just be a problem with the sample.  I will look into it and let you know.

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 have been trying out a few things ..... I did a search in google regarding the error

"business object" + "could not be found on this page" ... without refering to the coustomer object.

http://www.google.co.uk/search?hl=en&q=%22The+business+object%22+%22could+not+be+found+on+this+page.%22+&meta=

and got two answers both from the forum.  I must admit I felt a lot better when I found a few people who have had the same issue.  I do feel like I am being a pain.  Check the link for me please.  I don't think the issue was resolved.  I actually found I had posted to one of the threads earlier. .... I just tried the sample you uploaded ..... I'm still getting the same error though.  I'd like to hear any suggestions you may have .... I checked for VS service packs. 

Thanks in Advance

jd

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 tried the new example you sent on both my machine set ups.  I set the DB string in the Global.asax ... Both the Search and Edit forms worked OK.  Unfortunatly I still can't get the edit/update to work for the grid.  I get the same error mesage regarding the Customer Object ... Can you help?

Thanks in advance !

jd

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Here is a VS 2005 version.  I tested this on two different development machines and it works as it should.
Attachments
SampleWebApp_CSharp_2005.zip (88 views, 202.00 KB)
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
Thanks again for your help.

Sorry, ... I will need a 2005 version ....

Regards

jd

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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 (117 views, 202.00 KB)
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 (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
If you can, copy your HTML or exception code into notepad or something before pasting into the posting editor to strip out the formatting...it will show up better on the forum posts.

It acts as though it cannot find the ApplicationBasePage or the BOs that have been defined within the page.  Do you have any compiler errors or warnings that stand out when building the web site?

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
Thanks for your answers to my questions .. you have helped my understandin a lot.

Here is the error message at run time.

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


StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
1) I am now using an SQL log In rather than windows.  Is this the distinction you were making when you refered to TCP/IP connection versus Named pipes ?

Nope, connecting through Named Pipes means that a the application connects to SQL Server through memory, while a TCP/IP connection connects accross the network stack.  TCP/IP communication is disabled by default on SQL Server Express; you have to explicitly turn it on or you can only connect to the SQL Server from the machine where it's installed.

2) This might be a silly question but I thought that it was better to use Windows authentication or is this only for forms access.

With StrataFrame, there's no advantage either way.  But, with an SF WebForms application, the connection is shared across the entire AppDomain running the ASPX pages, meaning the IIS Hosting process shares the connection for all users that connect to the server.  If you use Windows authentication in a SF WebForms environment, you won't be able to consistently control the user under which the connections are opened since the user's credentials are not passed through to the connection.  So, you'll have to implement security in some other way besides using SQL Server security only.

3)  In the mean while I have a similar set up on my laptop where I am using XP Professional.  After the problem I had I went downstairs used my Laptop and realised it was probably on my laptop that I had seen the customer search working.  I checked the global.asax file and noted I had not set up a connection string yet it appeared to be working ok.  I am sure I read somewhere that the controls can use a default value for the connection string.  Is this probably the case ?  where did I set this default ?

The default is set through the global.asax file.  You specify the connection string when the DataBasics.DataSources.Add(new SqlDataSourceItem("", "conn string")); is called.  That connection string there is the one used by the data source.

4)  In both my set-ups the Search Customer form now works ok.  But, when I perform an edit of the data and try and save the edit I get the error below.  I noted in the design view of the form WebBindingSource.aspx the grid view has an error

"There was an error rendering the control".

"The data source does not support server-side data paging.

I'm not sure they are related ... can you suggest what I'm doing wrong ?

The WebBindingSource always displays that error at design-time, although the control itself does support paging.  So, the error you are receiving at runtime is independent of the error you're receiving at design-time (which can be ignored).  What's the error you're getting at runtime?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search