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
|
|
|
|
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.