StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Invalid Operation ExceptionExpand / Collapse
Author
Message
Posted 11/24/2006 2:04:28 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:04:33 PM
Posts: 380, Visits: 1,922

I have a business object (CustomerBO) that I’ve configured to raise a single property changed event for all properties. I’ve placed this BO on a SF maintenance form. The maintenance form also includes a ChildFormDialog that maps CustomerBO to the dialog form. If I add the FieldPropertyChanged event handler to the maintenance form code, I get an invalid operation exception (see attached) when I attempt to show the ChildFormDialog. If the FieldPropertyChanged event handler is not present on the maintenance form, the ChildFormDialog executes okay.  The FieldPropertyChanged event handler doesn’t have to contain any code to cause the error.

-Larry

  Post Attachments 
PropertyChangeError.png (32 views, 38.75 KB)

Post #4760
Posted 11/27/2006 8:26:10 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
Gotcha... I'll see if I can reproduce it on this end... shouldn't be too hard.


www.bungie.net
Post #4768
Posted 11/27/2006 11:13:03 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
I was certainly able to reproduce this one... I fixed it by creating a secondary collection of the keys for the dictionary that I was iterating over.  I'm building an update right now and I'll post it here so you can give it a try.


www.bungie.net
Post #4773
Posted 11/27/2006 11:20:26 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
OK, I only posted the source code to the MyAccount area because the full install is currently undergoing some revisions.  So, if you need the full blown install, you'll have to wait for the next update.  I also posted the DLLs here so you can just dump them out to the GAC and the common files folder if you want.


www.bungie.net

  Post Attachments 
StrataFrameDLLs.zip (23 views, 2.30 MB)
Post #4774
Posted 11/27/2006 1:13:30 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:04:33 PM
Posts: 380, Visits: 1,922

I downloaded and re-compiled the updated source and problem solved. Thanks for the quick fix. I’m glad you were able to reproduce this one. I still haven’t been able to get the database connection wizard to work without causing an application exception. Since you can’t reproduce it I’m feeling that I must have missed something in setting up security but can’t figure out what.

-Larry

Post #4777
Posted 11/27/2006 1:30:12 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/09/2008 3:36:08 PM
Posts: 2,686, Visits: 1,891
Yeah, I'm glad we got this one fixed as well.  As for the other problem... it might be some sort of PInvoke problem.  It looks from your samples that the C# MDAs are catching the exception while the VB.NET ones aren't, so I'm going to see if I can reproduce it in C#.  I'll keep you posted.


www.bungie.net
Post #4778
Posted 12/17/2006 2:54:51 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:04:33 PM
Posts: 380, Visits: 1,922

It looks like a new bug managed to slip into the 11/27/2006 source code. The problem does not appear when the same program code is run on the 11/20/2006 release version of the framework. The exception is raised when a user ID that does not exist in the security database is entered on the login screen (I'm using the standard SF login screen).  If you continue after the exception is raised, a security event ID: Error message is displayed and if a valid user ID is entered, the login succeeds.  

 

Here is the exception detail and a screenshot is attached.

 

MicroFour.StrataFrame.Business.BusinessLayerException was unhandled by user code
  Message="The CurrentRow could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 0.  CurrentRowIndex: -1."
  Source="MicroFour StrataFrame Business"
  StackTrace:
       at MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow()
       at MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO.CreateInternalData()
       at MicroFour.StrataFrame.Security.BusinessObjects.SFSUsersBO.IsDataValid()
 


  Post Attachments 
SFError11_27_06.png (18 views, 39.86 KB)

Post #5363
Posted 12/17/2006 3:27:37 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:04:33 PM
Posts: 380, Visits: 1,922
Please disregard the previous post. I found the source of the problem. I failed to recompile ALL of the SF projects when I installed from the source.

-Larry

Post #5365