StrataFrame Forum

Difficult to do data binding

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

By Chan - 7/26/2008

Hi,

I am facing difficulty to do data binding. Sometime, VS just couldn't find the businessobjects declared in ApplicationBasePage. Sometime, VS prompted error "OutOfRangeException" when I try to specify WebBBS.BusinessObjectName or during opening the web project.



I ever tried to recompile, reopen the project in order to overcome this problem. Sometime it helps but sometime it doesn't.



May I know what could it cause? I need 30 mins in order to specify a single WEBBBS which is very frustrated.



Please advice



Thank you
By Trent L. Taylor - 7/28/2008

I have never experienced or even heard of this type of behavior.  I am also entirely uncertain as to how this is occuring and where the error is appearing.  Can you give steps or provide a sample that shows how to reproduce?  Thanks.
By Chan - 7/28/2008

Hi,

It happened to all of the machines we are using (eval).



What we did is just created BO which stored in Business library project, then in applicatiobbasepage we have the following





private _myBO = new MyBO();

public MyBO MyBO

{

get { return _myBO; }

set { _myBO = value; }

}



private _myXBO= new MyXBO();

public MyXBO MyXBO

{

get { return _myXBO; }

set { _myXBO= value; }

}





After that we compile webapplication and also Business Library project. Drop webBBS on aspx, try to specify webBBS.BusinessObjectName. Sometime BOs are listed sometime not. Sometime I would hit error outofRangeException.



After many tries of recompile, problem might be gone.

Tried to restart VS, open the solution then will hit error nullexception.
By Trent L. Taylor - 7/29/2008

Can't reproduce.  You are welcome to post a sample that fails in your environment and I will see if it happens on my side and try to reproduce, but the steps that you are providing did not work.  Also, we have fixed the WBBS issue that you were fighting.  So be sure to download that update through the Posted Releases section of the forum.
By Chan - 7/29/2008

Hi,

I have attached screenshot of the error.

While open project, I hit error_NullReference.jpg. It was working fine when I try to change BusinessObjectName or datasource for aspxgridview. Then I recompile the solutions then I hit error_Indexoutofrange when try to select businessobjectname. I restarted VS, I hit error_nullreference again, but error_indexoutofrange gone.






By Dustin Taylor - 7/29/2008

Thanks for posting the sample, we were able to get to the bottom of it. It was throwing a null reference if there was no active page when testing for the page type. The issue is resolved in the (just posted) latest release of the 1.6.6 beta. Cool

http://forum.strataframe.net/Topic15687-22-1.aspx

By Chan - 7/29/2008

Hi,

Very sorry to inform that, the error still happen, but this time is just "Exception" but same stacktrace. And we found that, if we have *.aspx pre-opened while project load this error will occured (exception & NullReferenceException).



I will test this again using another machine later.



Thank you
By Trent L. Taylor - 7/30/2008

Let us know because it all works using the sample you provided on this side.  If you have any additional information then please let us know.  Thanks.
By Chan - 7/30/2008

Hi,

I have retest it using personal machine and it works. I will restest it at office tomorrow.

However, the IndexOutOfRangeException issue is still happen. I got to restart VS in order to solve it.



1. Open Project

2. Try to change WebBBS.BusinessObjectName using VS property grid.

3. If no error happen, recompile solution

4. Repeat step 2, error IndexOutOfRange occured.



Thank you
By Chan - 8/13/2008

Hi,

I have attached same project. When open it, I will hit Exception error.



Please rectify. Thank you
By Dustin Taylor - 8/14/2008

On my machine the project opens without error, runs without error, and I can can change the BusinessObjectName of the WebBBS without error regardless of how many times I build / rebuild the project. I noticed you had a breakpoint on the fill of the CustomersBO. I'm not sure if you were having problems with that, but for what it's worth the BO fills just fine on my machine.

I did have to change the references to use devexpress 8.1.1 rather than 8.1.6 since I don't have 8.1.6 on this machine, but I don't think that would affect the outcome.

Does this error occur on both of your machines? Or just your work machine?

And you have loaded the most recent StrataFrame beta build, correct?

By Chan - 8/14/2008

Hi,

I am able to make the project I uploaded to reproduce the exception. It is a bit tricky...



1. Open default.aspx in visual designer (Visual tab instead of split or source)

2. Open default.aspx.cs in code editor.

3. Close solutions. (File | Close Solution)

4. Open same project again from start page | recent projects list.