• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

mzirino
#1 Posted : Friday, June 5, 2009 8:41:07 PM(UTC)
mzirino

Rank: Member

Joined: 4/8/2008(UTC)
Posts: 21

I have a BV 5.4 rev 5 site running on Mosso.com, and i am getting "An error occured while trying to save the product to the database" when saving a dropdown list of product choices (ProductChoices.aspx.vb). On my development server (Win 2k8 using mosso's database) this error does not occur, and the product choices save fine. This makes me think there is something going wrong with the Mosso clustered environment. unfortunately, nothing is in the event log to tell me what happened. The rest of the site seems to work fine.

Any ideas what might be the cause? Or how to troubleshoot?

Thanks,
Marco
mzirino
#2 Posted : Sunday, June 7, 2009 4:40:58 PM(UTC)
mzirino

Rank: Member

Joined: 4/8/2008(UTC)
Posts: 21

I found the problem, it has to do with Mosso's custom medium-trust security configuration. In particular, it fails on Product.ShallowCopy(), Line 16

Line 14: Dim memoryStream As New IO.MemoryStream
Line 15: Dim formatter As New Runtime.Serialization.Formatters.Binary.BinaryFormatter
Line 16: formatter.Serialize(memoryStream, Me)
Line 17: memoryStream.Position = 0
Line 18: Dim newProduct As InternalProduct = DirectCast(formatter.Deserialize(memoryStream), InternalProduct)

What an incredible pain it was to find. I recommend putting this line in ProductChoiceCombinations.Insert(), as well as throwing it into the event log

Code:

Catch ex As Exception
request.Exceptions.Add(ex) ' This would have helped
Datalayer.SqlDataHelper.RollbackTransaction(request)



Are there any alternatives to doing a shallow copy outside of the BinaryFormatter?

Thanks,
Marco
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012