Error access data via ES
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


1234»»»

Error access data via ESExpand / Collapse
Author
Message
Posted 05/15/2007 1:22:09 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 7:28:28 PM
Posts: 1,148, Visits: 2,830
I getting a very reproducible (on my side anyway) error side when attempting to access some data via ES. Other data is accessed fine. Here is the error reported to the client:

BusinessLayerException
An error occurred while refreshing the data from field 'ProjectOrganizationBO.Owner' to property 'Text' on control 'txtOwner.'
BusinessLayerException
An error occurred while refreshing property 'Text' to control 'txtOwner'
TargetInvocationException
Exception has been thrown by the target of an invocation.
CryptographicException
Bad Data.


Source : MicroFour StrataFrame Business

Stack Trace:
at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
at System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone)
at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Stream.ReadByte()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadBoolean()
at MicroFour.StrataFrame.Data.Enterprise.BaseResults.ReadDataFromStream(BinaryReader Reader)
at MicroFour.StrataFrame.Data.Enterprise.ExecuteScalarResults.ReadDataFromStream(BinaryReader Reader)
at MicroFour.StrataFrame.Data.Enterprise.ExecuteScalarResults.CreateFromStream(BinaryReader Reader)
at MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem.?(BaseParams A_0, RemoteDataSourceCommand A_1)
at MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem.?(DbCommand A_0, Boolean A_1, String A_2)
at MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem.ExecuteScalar(DbCommand Command)
at MicroFour.StrataFrame.Business.BusinessLayer.ExecuteScalar(DbCommand CommandToExecute)
at FOXSystems.RAMS.BusinessObjects.Project.ProjectOrganizationBO.get_Owner() in E:\FoxSystems\RAMS\RAMS.NET\BusinessObjects\Project\ProjectOrganizationBO.vb:line 387
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor.GetValue(Object component)
at System.Windows.Forms.BindToObject.GetValue()
at System.Windows.Forms.Binding.PushData(Boolean force)
at System.Windows.Forms.Binding.ReadValue()
at MicroFour.StrataFrame.Business.BusinessLayer.RefreshValue(Control ControlToRefresh, String PropertyName)
at MicroFour.StrataFrame.Business.BusinessLayer.RefreshControl(IBusinessBindable ControlToRefresh, Boolean DataPresent)
at MicroFour.StrataFrame.Business.BusinessLayer.RefreshBoundControls()
at MicroFour.StrataFrame.Business.BusinessLayer.raise_Navigated(NavigatedEventArgs e)
at MicroFour.StrataFrame.Business.BusinessLayer.OnNavigated(NavigatedEventArgs e)
at MicroFour.StrataFrame.Business.BusinessLayer.Navigate(BusinessNavigationDirection Direction, Int32 AbsoluteIndex, Object[] PrimaryKeyValues, Boolean AttemptToCheckRules, Boolean IsRefill)
at MicroFour.StrataFrame.Business.BusinessLayer.NavigateToPrimaryKey(Object[] PrimaryKeyValues)
at FOXSystems.RAMS.MitaAnalysis.OrgTools.SynchBoToTree(TreeView anyTree, BusinessLayer anyBO) in E:\FoxSystems\RAMS\RAMS.NET\MitaAnalysis\OrgTools.vb:line 421
at FOXSystems.RAMS.MitaAnalysis.MITAWizardPages.OrgDefinePage.tvwOrg_AfterSelect(Object sender, TreeViewEventArgs e) in E:\FoxSystems\RAMS\RAMS.NET\MitaAnalysis\MITAWizardPages\OrgDefinePage.vb:line 303
at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Here is the error reported via ES:

ArgumentNullException
Object Graph cannot be null.
Parameter name: graph

Source : mscorlib

Stack Trace:
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at MicroFour.StrataFrame.Data.Enterprise.ExecuteScalarResults.WriteDataToStream(BinaryWriter Writer)
at MicroFour.StrataFrame.Enterprise.Server.RemoteDataSource.ProcessRequest(HttpContext context)


Some info about what is going on:

- This error does not happen if I connect directly.
- If I step through the code, the error occurs on the line that fills the data table of the BO.
- The Owner property is actually a custom property that is doing a separate ExecuteScalar command to get that value.
- txtOwner is bound to the Owner property.

Any ideas why this isn't working with ES?
Post #8813
Posted 05/15/2007 1:26:20 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 7:28:28 PM
Posts: 1,148, Visits: 2,830
One more thing...the ExecuteScalar could and is likely returning Nothing, as there is often no row found. On the client I'm checking for Nothing and DbNull.Value.
Post #8814
Posted 05/15/2007 1:49:38 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
Yep, this was the bug that we mentioned in class... It's not that we're testing on DBNull.Value, it's that we're not testing at all and just trying to serialize the returned value, which is nothing...

Here are the DLLs that you need to fix it.  Copy them to the bin\ folder of your enterprise server and either restart IIS, recycle the application pool, or stop and start the website.


www.bungie.net


  Post Attachments 
es.zip (4 views, 38.37 KB)
Post #8815
Posted 05/15/2007 2:15:42 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 7:28:28 PM
Posts: 1,148, Visits: 2,830
Thanks Ben! I missed that this was a current ES bug.

I copied the dlls to the server, restarted IIS. Now I'm getting bad data error. (CrypographicException).
I checked the keys and they match. Did the public tokens change on the dlls? Did I not get IIS reset enough?
Post #8816
Posted 05/15/2007 2:19:20 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Yesterday @ 7:28:28 PM
Posts: 1,148, Visits: 2,830
As a test, I turned off encryption and now I get EndOfStreamException.
Post #8817
Posted 05/16/2007 9:00:54 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
OK, here are all of the DLLs that are part of the server, just in case another one of them changed.

[Edit: removed attachment]


www.bungie.net
Post #8824
Posted 05/16/2007 11:40:29 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 06/17/2008 9:28:35 AM
Posts: 2,649, Visits: 1,863
OK, well Greg, it wasn't a problem with the ES, it was a problem with the operator... I never created the proper project configuration for the Dotfuscator project, so if I built it in debug and then built the solution, it would create the proper DLLs for you.  So, I've been sending you the same version over and over again...

So, here are the fixed DLLs   Give them a shot and let me know how it works...


www.bungie.net


  Post Attachments 
ES.zip (8 views, 697.67 KB)
Post #8830
Posted 05/16/2007 2:32:14 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP