Giter Club home page Giter Club logo

Comments (5)

DawidPotgieter avatar DawidPotgieter commented on June 9, 2024

Hi Perry,

Looking at the exception message, I cannot see that this is actually happening within the BSO plugin. The fact that there is an "ExtractEFSFileId" reference in there seems to be indicating something about "Encrypted File System" maybe? Do you perhaps have some other plugins that could be causing this?

The absolute best way to figure this out is to actually debug the "Retrieve" method of the plugin, using the SDK's "Plugin Registration Tool". It allows you to capture a profile of the event you're trying to execute and then replay it by attaching VS debugger using the code.

It is kind of odd though, since if you look at the code, "Retrieve" and "RetrieveMultiple" is basically handled by the exact same code.

Can you check whether the specific file you're trying to access might have originated from an encrypted file system perhaps?

Hmm. Another thing I see is that you retrieve it via the code. Can't be certain exactly what you're trying to do, but have you done this bit : https://github.com/DawidPotgieter/Dynamics-CRM-Binary-Storage-Options/wiki/Caveats#using-iorganizationserviceloadproperty-api ?

Dawid

from dynamics-crm-binary-storage-options.

perry513 avatar perry513 commented on June 9, 2024

Thanks for the quick response, will definitely try to debug it as you suggested and post the result here. Although I suspect the error happens before it reaches the plugin...

It may have something to do with the Encryption, we had some issue with the encryption key during the upgrade. I will check with my college.

Can you check whether the specific file you're trying to access might have originated from an encrypted file system perhaps?
No, it happens to all email attachments. We also turned of all compression and encryption in the plugin.

Maybe I should've mentioned that, if I change the "Create of activity mime attachment" to Sync. We then do not receive above error from downloading attachment. I know that it has to be async otherwise the file would not be removed from the database. However, this tells me that, as long as the file is saved in DB, we do not receive above error. I'm not 100% sure but I think in this example, the file is still retrieved from blob but not from DB.

Another thing I see is that you retrieve it via the code
No, I'm not retrieving from code. It was only my test app to prove it only happens to retrieve but not retrieve multiple.

from dynamics-crm-binary-storage-options.

perry513 avatar perry513 commented on June 9, 2024

Ok, I can confirm that error is not coming from the plugin.
These are the steps I've done

  1. enable profiling for step "Retrieve of activitymimeattachment"
  2. click download on an attachment and received the error
  3. download and debug the profile
  4. no error, I step through and also trace log the entity which looks fine.

It is still an issue with retrieve method, below i have 2 query basically retrieving the same record.
`//failed, soon as I retrieve "body" column, note that below retrieve() doesn't trigger a new profile
var e = _serviceProxy.Retrieve(ActivityMimeAttachment.EntityLogicalName, new Guid("8e240f9f-9b6f-e911-80d8-00155d6e7301"),
new ColumnSet(true) );

                //success
                QueryExpression aq = new QueryExpression
                {
                    EntityName = ActivityMimeAttachment.EntityLogicalName,
                    ColumnSet = new ColumnSet("body"),
                    Criteria = new FilterExpression
                    {
                        Conditions =
                                        {
                                            new ConditionExpression
                                            {
                                                AttributeName = "activitymimeattachmentid",
                                                Operator = ConditionOperator.Equal,
                                                Values = {new Guid("8e240f9f-9b6f-e911-80d8-00155d6e7301") }
                                            }
                                        }
                    }
                };
                EntityCollection rs = _serviceProxy.RetrieveMultiple(aq);`

Looking at the exception message, I cannot see that this is actually happening within the BSO plugin. The fact that there is an "ExtractEFSFileId" reference in there seems to be indicating something about "Encrypted File System" maybe? Do you perhaps have some other plugins that could be causing this?

I checked with college, they couldn't get the old key work during the upgrade + migration. They end up deleting the sensitive data (only 1 record) from DB directly and re-assign a new key. I'm not sure if that breaks anything. edit: no, we dont have any other plugin that relates to email attachment.

I'm pretty lost at the moment on what should I do next. Any help or direction is much appreciated. Maybe I should log a support case with MS.

edit 2: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/field-level-data-encryption, according to this nothing on attachment table is encrypted.

from dynamics-crm-binary-storage-options.

perry513 avatar perry513 commented on June 9, 2024

Issue has been resolved after CRM is upgraded to v9.0.10.11 (on prem).

from dynamics-crm-binary-storage-options.

DawidPotgieter avatar DawidPotgieter commented on June 9, 2024

I would just like to thank you for actually coming back and resolving the issue. Doesn't happen often :)

Cheers.

from dynamics-crm-binary-storage-options.

Related Issues (20)

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.