none
Is it possible to hide the CannotCreateCustomizationDomainException? RRS feed

  • Question

  • We are trying the document customizations to give more functionalities  for user on documents generated through our application.

    Our application opens documents in two mode, write and read only. In case of read only mode documents are opened from temporary internet folders, while its opened from this folder user gets a message saying "Customization does not have the permissions required to create an application domain." and the customization is not available in such cases.

    I believe this is because office by default don't trust this location, which works for us also. But is there a way to disable that message, because getting this message every time he or she opens an read only document is quite annoying.

    Any help is appreciated.
    Thursday, December 17, 2009 4:33 AM

Answers

  • Hi Ginesh

    The only way to suppress the message would be by (temporarily) unlinkng the document from the VSTO dll. This can be done server-side (as well as relinking) through the ServerDocument functionality. Here's the starting point in the MSDN documentation.
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Wednesday, December 30, 2009 8:50 AM
    Thursday, December 17, 2009 7:15 AM
    Moderator

All replies

  • Hi Ginesh

    The only way to suppress the message would be by (temporarily) unlinkng the document from the VSTO dll. This can be done server-side (as well as relinking) through the ServerDocument functionality. Here's the starting point in the MSDN documentation.
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Wednesday, December 30, 2009 8:50 AM
    Thursday, December 17, 2009 7:15 AM
    Moderator
  • Hello Ginesh,

    I guess that you have deployed this document to a network using ClickOnce. If yes, you need to add this path to trust locations of the document application (Excel or Word). This issue has been discussed before for many time. You could refer to this link.

    In summary, please take look at this thread posted by Mary: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/a6826a31-abb5-417d-b2dc-cf7d39f6f0b6, which lists steps to set the trust locations.

    If I have mistaken this scenario, or you have any further question, please feel free to follow up.

    Best regards,
    Bessie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, December 23, 2009 6:00 AM
  • Hello Bessie

    I understand the need of adding the network location to trusted locations list for click once deployment.  My question is how do we suppress the word error message when we open a word document which has a link to a VSTO dll from temporary folders like Temporary Internet Files.

    Word does not allow us to add Temporary Internet Files to its trusted location for security reasons.  If some how we can make the word silently disable the document customization with out showing any error messages that would be great.

    It looks like the only way is to removing the link from custom properties.
    Thursday, December 24, 2009 9:19 AM
  • Hello again Ginesh,

    Sorry for mistaking this issue. In this MSDN article: Security in Office Solutions, it lists all the securities of Office solutions. I think you could try the suggestion of Cindy. To detach VSTO customization, please refer to this thread: http://msdn.microsoft.com/en-us/library/8fza57cs(VS.80).aspx.

    Best regards,
    Bessie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 24, 2009 10:21 AM