Code Monkey home page Code Monkey logo

dynamics-crm-binary-storage-options's Introduction

This plugin allows you to move email attachments and note attachments from the CRM database to an external provider, with both Azure Blob storage and Azure File storage providers included. Once installed and configured, the process is transparent to users and the organizationservice. Also comes with a migration tool for existing binaries.

Here are some features :

  • Runs in sandbox mode. Tested with CRM 2011,2013 (if you recompile with older SDK),2015 on premise, Dynamics 365.
  • Supports either Azure Blob storage or Azure File storage. Easy to add more providers. For instance, the (currently) undocumented "Proxy" provider (V5 branch) also provides a local network FileShare option as the repository.
  • Supports client side (crm server) compression and encryption (v4.1+), in addition to all the server side encryption schemes.
  • Automatic failover if using RAGRS blob storage
  • Works seamlessly with existing attachments/annotations. If the binary data is available in CRM, that is used as is. If not, it returns the external version.
  • Nobody will know, UI/api works exactly as before :)
  • Includes a handy migration tool to move existing annotation/attachments out of your CRM db

See Wiki on how to configure setup the different versions and why you'd use said version. The FAQ page is also a very good read ;P

dynamics-crm-binary-storage-options's People

Contributors

dawidpotgieter avatar matthewtheraven avatar rwilson504 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamics-crm-binary-storage-options's Issues

CRM online backward compatibility

We are moving to the cloud soon, but I would like to migrate all attachments to azure before then, but will the Attachments and annotation still work if we move the database to the cloud when all attachments have been moved ?

Has the 5Mb limit been fixed?

Hi there. Are you aware if the 5Mb sandbox issue has been fixed recently? I have been evaluating Attachment Manager by MS Labs and this plugin and both appear to be working with files over 5Mb, once the attachment setting is modified in System Settings. Has your experience been the same and has it been confirmed by Microsoft that this restriction does not apply any more?

The wiki page issues

The page in the wiki for Migration with V4.1 is not working. Is it working for you ?

Question: Attachment Searchability

With relevance search enabled, attachments stored in CRM are searchable. Is the same true for attachments stored in Azure Blob or Azure File Storage?

failed to 'Retrieve' for 'activitymimeattachment'.

After upgrading CRM from v8 to v9.0.3.7, we are receiving below error when downloading email attachment (note attachment is fine)
- File Download Failure

Below is the error from event viewer
The Web Service plug-in failed in OrganizationId: xxx; SdkMessageProcessingStepId: xxx; EntityName: activitymimeattachment; Stage: 30; MessageName: Retrieve; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) Inner Exception: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at Microsoft.Crm.ObjectModel.AttachmentServiceBase.ExtractEFSFileId(String body) at Microsoft.Crm.ObjectModel.ActivityMimeAttachmentService.<>c__DisplayClass10_0.<Retrieve>b__0() at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)

I tested it from the code and can confirm that _serviceProxy.RetrieveMultiple works. It is just _serviceProxy.Retrieve() gives above error.

We tried to reinstall your CRM solution, which didn't resolve the issue.

Can anyone please help?

Thanks in advance
Perry Ma

Problem with IfdSelected variable in Migrate Solution

I have tried to run a migration against a Online 8.2 instance, at first the migrate program found nothing to move, I then tried to debug the application and found that it chose a wrong OrganizationServiceProxy,

the code that creates the problem is :
private bool IfdSelected { get { bool value = false; if (rdoIFDAuth.InvokeRequired) { rdoIFDAuth.BeginInvoke(new MethodInvoker(delegate { value = rdoIFDAuth.Checked; })); } else { value = rdoIFDAuth.Checked; } return value; } }
and the place where it's used
if (IfdSelected) { localProxy = new OrganizationServiceProxy(serviceManagement, authCredentials.SecurityTokenResponse); } else { localProxy = new OrganizationServiceProxy(serviceManagement, authCredentials.ClientCredentials); }

When the IfdSelected is used the BeginInvoke is called as it should but the value returned is still false, so the local Proxy will use the wrong Authentication method and fail several places in the migrate program.

I have fixed it by setting it to use the SecurityTokenResponse Auth everytime but a better way could probably be found.

Plugin on create

Have you received any bug reports that sometimes the note is created in AzureBlob with the empty byte content? I tested and got mixed results, many files created successfully, but some are not.

The created on date = modified on date, so it seems happened on-create plugin not on-update.

Delete annotation/note

Tested delete note both from Advanced Find and from record form, both didn't result in deleting the file from AzureBlob.

Dynamics 365 Online - The authentication endpoint Kerberos was not found on the configured Secure Token Service

When running the Migrate application against email attachments only I seem to get the following error. However the plugins work fine for new email being created.

Any ideas what the cause could be? I noticed localProxy is used in a few places rather than proxy, swapping this seemed to create some email attachments in Azure but still quite a few failures.

I a using the v8 version of the SDK but that is the only change i have made to the project and i am using version 4.1

Migration 4.1 does not work with CRM online

After Microsoft have updated the default TLS version to 1.2 the current version of Migrate 4.1 won't work, have you experienced this before ?

I have tried to download the source code and I can see that the nuget packages used is old, so they will need to be updated I think

Provider Type: AzureBlob error

When installing the V4.1 solution into my sandbox I always keep getting the error:
Microsoft.Xrm.Sdk.InvalidPluginExecutionException: The storage provider 'AzureBlob' failed to when calling 'Create' method.
When I'm trying to create a note with an attachment.

My unsecure Config seems right:

<Settings>
 <Setting key="ConfigurationProviderType" value="PluginStepConfigurationProvider" />
 <Setting key="Provider Type" value="AzureBlob" />
 <Setting key="Compression" value="Zip" />
 <Setting key="CompressionThreshold" value="0.95" />
 <Setting key="Encryption" value="AES256" />
 <Setting key="annotationFolder" value="annotations" />
 <Setting key="annotationRoot" value="crm" />
 <Setting key="activitymimeattachmentFolder" value="activitymimeattachments" />
 <Setting key="activitymimeattachmentRoot" value="crm" />
</Settings>

and my secure

<Settings>
 <Setting key="StorageAccount" value="XXX" />
 <Setting key="StorageKey" value="XXX" />
 <Setting key="AES256EncryptionKey" value="XXX" />
 <Setting key="AES256EncryptionKeySalt" value="XXX" />
</Settings>

I am using CRM online.

Only small storage gained - Dynamics 365 (Online)

After implementing the solution version 4. I had verified that the migration tool run completely by check that the "body" have been updated to "IA==". The storage size used does goes down referring to Dynamics Capacity Report but only by a small amount. We have only recovered about 17 GB out of 46 GB of storage.

I would have expected more storage space to be recovered seeing all attachments should be in Azure. Is this normal?

image

Update email attachment when email is in pending send state.

Hi, first i want to thank you for this plugin, it's great.

I have a question about how this plugin works when the email state is in pending send.

We are currently running this plugin on a CRM 365 on premise, and we are facing a problem when the email status is in Pending Send. Our email router sends emails every 5 minutes so when this plugin execute, it can't update the email attachment.
I have an idea to fix this and i want your opinion on this :

Instead of updating the attachment we start a Workflow who wait for this email to be sent and then call a custom workflow activity to finally update the attachment.

Access Question

Hi Dawid
This looks like a fantastic solution.
Maybe a silly question but I'm unsure how the security works with this?
Will only the CRM owners of the Note/Email be able to view the attachment once moved to blob storage or can anyone inside / outside the organisation see it?

thanks a million
Keith

Migration doesn't do anything

I Have tried to start the migration with 4.1 in our test environment, it connects to the azure storage as it should but when I press the migrate button it just shows disabling plugins and then enabling the plugins again and then all done in 2 seconds, , there is no error messages at all.

Attachments on an inactive e-mail

I have an issue with e-mail attachements. These are stored in Azure Blob storage, but when I try to retreive them they give an error. Note attachements work fine.

Any ideas?

Question with Dynamics 365 and checking CRM storage

I've been testing your plug-in in our Sandbox instance and was wondering if there as a way to check that the documents aren't being stored in the CRM storage?

I've checked the Service Health tab for the instances and also tried the Advanced Find for Notes with a File Size (Bytes) filter and both seem to show that CRM storage is being used.

Attachments on email templates

When I create an email template with an attachment the plugin adds the attachment to azure fine but what it errors when using the email template to send to multiple contacts.

When sending the email it gets stuck in a pending state with an error on the attachment saying that it cannot find the specified attachment in azure.

Looking at the system jobs I can see that upon sending a quick campaign with an email template the BinaryStorageOptions.Plugin: Create of activitymimeattachment is triggering successfully, but the attachment is not appearing in azure causing the error to occur on sending the email.

If i send a single email with an attachment it works fine. Its just upon sending email templates.

Has anyone else come across this?

3 Plugin steps is Async and does not fire

Hi I have installed the 4.1 solution in a 2015 environment, but not all the steps was working, step on Create ActivityMimeAttachment, Delete Annotation and Delete ActivityMimeAttachment, I tried a few things but then I saw that it was the only steps that was running as Async steps, when I changed them to be sync instead, everything worked.

Do you have any comments ? is it a weird installation error that these 3 steps is Async ? or was there a reason for them to be Async ?

I hope you can bring some light to the issue, so I can be sure that problems won't arise later on thank you :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.