Sorry all my msgs!
Last: The provider is almost working. I can add and delete folders and files. The only thing i couldn't resolve is de "cut and paste".
I have two diferent exceptions comming from TreeServices.asmx
One when i try to move a file and other when i try to move a folder.
When i move a folder it pases throw the Update method in the provider, the update in Database is OK but then in treeServices when the SubmitChanges is made i get an exception:
Sorry, i didn't change the namespaces yet
Last: The provider is almost working. I can add and delete folders and files. The only thing i couldn't resolve is de "cut and paste".
I have two diferent exceptions comming from TreeServices.asmx
One when i try to move a file and other when i try to move a folder.
When i move a folder it pases throw the Update method in the provider, the update in Database is OK but then in treeServices when the SubmitChanges is made i get an exception:
Sorry, i didn't change the namespaces yet
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.Then when moving a file, it doesn't goes throw the Update method, but the TreeServices in the drag and drop throws an exception of invalid cast (it is trying to cast from my class Composite.Plugins.Data.DataProviders.DBMediaFileProvider.DBMediaFile: IFile to the Composite.Media.DBMediaFile type that is mapped to the database table):
at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)
at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicUpdate(TrackedObject item)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.Update(TrackedObject item)
at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges()
at Composite.Plugins.Data.DataProviders.MSSqlServerDataProvider.SqlDataTypeStoresContainer.SubmitChanges(DataContext dataContext)
at Composite.Plugins.Data.DataProviders.MSSqlServerDataProvider.SqlDataTypeStoresContainer.Update(IEnumerable1 dataset)
1 datas)
at Composite.Plugins.Data.DataProviders.MSSqlServerDataProvider.SqlDataProvider.Update(IEnumerable
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.<>c__DisplayClassc.<Update>b__a(IWritableDataProvider provider)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.<>c__DisplayClass1a1.<SyncronizedCall>b__19(TProvider provider)
2 func)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.SyncronizedCall[TProvider,TResult](String providerName, SyncronizedCallDelegate
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.SyncronizedCall[TProvider](String providerName, SyncronizedCallDelegate1 func)
1 dataset)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.Update(String providerName, IEnumerable
at Composite.Data.DataFacadeImpl.Update(IEnumerable1 dataset, Boolean suppressEventing, Boolean performForeignKeyIntegrityCheck, Boolean performeValidation)
1 dataset)
at Composite.Data.DataFacade.Update(IEnumerable
at Composite.Data.DataFacade.Update(IData data)
at Composite.Core.Implementation.DataConnectionImplementation.Update[TData](TData item)
at Composite.Data.DataConnection.Update[TData](TData item)
at Composite.Plugins.Data.DataProviders.DBMediaFileProvider.DBMediaFileFacade.MoveDir(String oldFolder, String newFolder) in e:\Proyectos\RSA V2\Website\App_Code\Composite\Plugins\DBMediaFileFacade.cs:line 109
at Composite.Plugins.Data.DataProviders.DBMediaFileProvider.DBMediaFileProvider.Update(IEnumerable1 datas) in e:\Proyectos\RSA V2\Website\App_Code\Composite\Plugins\DBMediaFileProvider.cs:line 124
1.<SyncronizedCall>b__19(TProvider provider)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.<>c__DisplayClassc.<Update>b__a(IWritableDataProvider provider)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.<>c__DisplayClass1a
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.SyncronizedCall[TProvider,TResult](String providerName, SyncronizedCallDelegate2 func)
1 func)
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.SyncronizedCall[TProvider](String providerName, SyncronizedCallDelegate
at Composite.Data.Foundation.PluginFacades.DataProviderPluginFacade.Update(String providerName, IEnumerable1 dataset)
1 dataset, Boolean suppressEventing, Boolean performForeignKeyIntegrityCheck, Boolean performeValidation)
at Composite.Data.DataFacadeImpl.Update(IEnumerable
at Composite.Data.DataFacade.Update(IEnumerable`1 dataset)
at Composite.Data.DataFacade.Update(IData data)
at Composite.Plugins.Elements.ElementProviders.MediaFileProviderElementProvider.MediaFileProviderElementProvider.OnElementDraggedAndDropped(EntityToken draggedEntityToken, EntityToken newParentEntityToken, Int32 dropIndex, DragAndDropType dragAndDropType, FlowControllerServicesContainer flowControllerServicesContainer)
at Composite.C1Console.Elements.Foundation.PluginFacades.ElementProviderPluginFacade.OnElementDraggedAndDropped(String providerName, EntityToken draggedEntityToken, EntityToken newParentEntityToken, Int32 dropIndex, DragAndDropType dragAndDropType, FlowControllerServicesContainer draggedElementFlowControllerServicesContainer)
at Composite.C1Console.Elements.ElementFacade.ExecuteElementDraggedAndDropped(ElementHandle draggedElementHandle, ElementHandle newParentElementHandle, Int32 dropIndex, Boolean isCopy, FlowControllerServicesContainer draggedElementFlowControllerServicesContainer)
at Composite.Core.WebClient.FlowMediators.ActionExecutionMediator.ExecuteElementDraggedAndDropped(ElementHandle draggedElementHandle, ElementHandle newParentdElementHandle, Int32 dropIndex, String consoleId, Boolean isCopy)
at Composite.Core.WebClient.FlowMediators.TreeServicesFacade.ExecuteElementDraggedAndDropped(String draggedElementProviderName, String draggedElementSerializedEntityToken, String draggedElementPiggybag, String newParentElementProviderName, String newParentElementSerializedEntityToken, String newParentElementPiggybag, Int32 dropIndex, String consoleId, Boolean isCopy)
at Composite.Services.TreeServices.ExecuteDropElementAction(ClientElement draggedClientElement, ClientElement newParentClientElement, Int32 dropIndex, String consoleId, Boolean isCopy) in e:\Proyectos\RSA V2\Website\Composite\services\Tree\TreeServices.asmx:line 237
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Object of type 'Composite.Plugins.Data.DataProviders.DBMediaFileProvider.DBMediaFile' cannot be converted to type 'Composite.Media.DBMediaFile'.*napernik wrote
at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
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.MethodBase.Invoke(Object obj, Object[] parameters)
at Composite.Data.Validation.ValidationFacadeImpl.Validate(Type interfaceType, IData data)
at Composite.Data.Validation.ValidationFacade.Validate(Type interfaceType, IData data)
at Composite.Data.Validation.ValidationFacade.Validate(IData data)
at Composite.Data.DataFacadeImpl.Update(IEnumerable1 dataset, Boolean suppressEventing, Boolean performForeignKeyIntegrityCheck, Boolean performeValidation)
1 dataset)
at Composite.Data.DataFacade.Update(IEnumerable
at Composite.Data.DataFacade.Update(IData data)
at Composite.Plugins.Elements.ElementProviders.MediaFileProviderElementProvider.MediaFileProviderElementProvider.OnElementDraggedAndDropped(EntityToken draggedEntityToken, EntityToken newParentEntityToken, Int32 dropIndex, DragAndDropType dragAndDropType, FlowControllerServicesContainer flowControllerServicesContainer)
at Composite.C1Console.Elements.Foundation.PluginFacades.ElementProviderPluginFacade.OnElementDraggedAndDropped(String providerName, EntityToken draggedEntityToken, EntityToken newParentEntityToken, Int32 dropIndex, DragAndDropType dragAndDropType, FlowControllerServicesContainer draggedElementFlowControllerServicesContainer)
at Composite.C1Console.Elements.ElementFacade.ExecuteElementDraggedAndDropped(ElementHandle draggedElementHandle, ElementHandle newParentElementHandle, Int32 dropIndex, Boolean isCopy, FlowControllerServicesContainer draggedElementFlowControllerServicesContainer)
at Composite.Core.WebClient.FlowMediators.ActionExecutionMediator.ExecuteElementDraggedAndDropped(ElementHandle draggedElementHandle, ElementHandle newParentdElementHandle, Int32 dropIndex, String consoleId, Boolean isCopy)
at Composite.Core.WebClient.FlowMediators.TreeServicesFacade.ExecuteElementDraggedAndDropped(String draggedElementProviderName, String draggedElementSer