StrataFrame Forum

WebBusinessBindingSource - cannot use it

http://forum.strataframe.net/Topic20232.aspx

By Fabian R Silva, - - 10/20/2008

Hello again... I posted about this error before, but I not sure what the problem is, I used the 1.6.5 and 1.6.6 and older versions and on all of this I open the SampleWebApp, go to WebBindingsource properties, try to open the BusinessobjectName combo to change it and get a error that say



"The ApplicationBasePage could not be located. Please rebuild project."



Source : MicroFour StrataFrame Extensibility



Stack Trace:

en MicroFour.StrataFrame.Extensibility.BusinessObjectNameTypeEditor.EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)



I tried to edit it manually... and some test before, and give up on my old pc (I think that my pc not work) but now I installed the VS 2008, SF 1.6.6, opened the sample (a convertion assistant to vs2008 appears), I rebuild, the project run ok, but when I try to edit this property the error appears



I try to make a web with 3 BO, something simple...but I not known what I not doing well, any help on this will be helpfull Smile thanks.
By Trent L. Taylor - 10/21/2008

I beleive that in your previous posts we said the same thing I am about to say here Smile

It looks like your StrataFrame assemblies are not in sync.  You may have loaded a newer version and due to permissions, etc. not all of the assemblies were updated.  The GAC may have more than one version of the assemblies, etc.  The first thing that I would recommend is downloading the 1.6.6 build from the web site, and making sure that you have full administrative permissions, and then make sure that your assmeblies are all updated.  One way to help in the verification is to go into Visual Studio and click StrataFrame-> Version.

The problem here sounds like the SF Add-In and Extensibility may not be totally up to date.  If you do this and the problem persists I will try and reproduce this again, but I have tried and been unsuccessful in reproducing (which is obviously necessary for me to give you a step-by-step process to resolve your issue).  This is going to be environmental so we will have to try and figure out what the catalyst is here.

By Fabian R Silva, - - 10/21/2008

I installed VS2008, DevExpress 8.2.4, Strataframe 1.6.6 and modified intherited ui from source to allow strataframe devex custom controls to work. It's a clean XP Pro machine

I opened the sample, converted it to 2008 (stay it on 2.0) and comment the line in web.config about authentication (it on vs2008 appears to give me an error) and then build, test to open the WebBindingSource.ASPX page, and change the WBBS BusinessObjectName property, it give me te error.



I will try to make a little page with only 1 BO (witout a class) and a windows grid and see if it works, I not sure what more I can try.
By Fabian R Silva, - - 10/21/2008

Fabian R Silva, - (10/21/2008)
I installed VS2008, DevExpress 8.2.4, Strataframe 1.6.6 and modified intherited ui from source to allow strataframe devex custom controls to work. It's a clean XP Pro machine

I opened the sample, converted it to 2008 (stay it on 2.0) and comment the line in web.config about authentication (it on vs2008 appears to give me an error) and then build, test to open the WebBindingSource.ASPX page, and change the WBBS BusinessObjectName property, it give me te error.



I will try to make a little page with only 1 BO (witout a class) and a windows grid and see if it works, I not sure what more I can try.




I created a new strataframe web project and run it as is and it give me a error on default.aspx that cannot find something....I deleted the default.aspx page and created a "test.aspx" page, run it and it run ok (blank page for now).

* I added a class "Business1" BO mapped to Customers (SF Sample db)

* On global.asax put the correct connectionstring to the SF sample db (same that use the BOM)

* Drop a grid and a WBBS on test.aspx

* on ApplicationBasePage put a definition to "Business1" BO

- Friend WithEvents Customers1 As BusinessObject1

* build the project

* close and open it again

* open test.aspx

* If I try to set the WBBS1 BusinessObjectName property, it show only "(None)" but it not crash like the sample before mentioned



then I created a business object library project and reference it on the web project, move businessobject1 to this BO project, and change the reference to this bo on ApplicationBasePage.

Build again, try to see on test WBBS1 and still show only "(none)"

try to close/ open / rebuild and see if it show "Customers1" on the list but nothing... Customers1 not appears....



I try on the load of test.aspx to put

Customers1.FillDataTable("select * from " & customers1.TableName)



and it say that null object reference, then I changed on ApplicationBasePage the line



'Friend WithEvents Customers1 As BusinessObjectLibrary1.BusinessObject1

'To

Private fCustomers1 As New BusinessObjectLibrary1.BusinessObject1

Public Property Customers1() As BusinessObjectLibrary1.BusinessObject1

Get

Return fCustomers1

End Get

Set(ByVal value As BusinessObjectLibrary1.BusinessObject1)

fCustomers1 = value

End Set

End Property



and then run the project, It again show a blank page... but when I stop the debug and go to designer it show the Customers1 BO



I not sure why the web example doesn't work. I try to delete the commonbussiness project, created a new one and put a BO on it and when I build the web project, it give a error that cannot find the NewBOLibrary.NewBO ( the type xxxx is not defined)



I not sure why it fails, Ican make it work on a basic new web project and try to edit the web sample and cannot make it work, I will try to make a new project and pass my web pages to it and see if I can create new BO with same logic that the project that doesn't work and see what happen.



If someone have the same problem before and can solution it please tell me what another thing i can do



thanks for all the support.



pd: I see that I put "Friend withevents" and it have to be "public" to work, I opened the test web project, put a 2nd reference to same customers (businessobject1) bo, with a public withevents TestBO as BusinessObject1 and it appears too... I confused on why it works on this simple project but not on the sample or my project.



pd2: I try to send the example that I created, but a error ocurrs when I try to edit attachments (its a rar file)
By Trent L. Taylor - 10/22/2008

Well, here is the good news, I know that StrataFrame works as it should as I created a new web project yesterday, performed queries, updated databases, etc. and all of the designers and execution worked perfectly.  I am running on the 1.6.7 beta (but the code here will be the same as the 1.6.6 release).

So here is what I would recommend.  Post a sample project that reproduces this behavior on your machine.  I know that you suggested that the sample does this on your machine, but I do no want to use the sample here since there are other factors in that formula that I want to eliminate.

Create a web project, not a web site.  This could also be a factor.  To create a new web project, click on File->New Project->StrataFrame Web Application Project.  If the behavior persists when you create a web project (instead of a web site) then post your sample here and I will see if the behavior is reproducable here.