locked
VS2013 Office2013 RRS feed

  • Question

  • I am trying to debug application for Excel workbook in Visual Studio (C#).

    When I create new project do nothing and start debugging VS opens Excel and everything seems to work OK.

    However if I try to modify startup function in workbook.cs file I am getting message it happens even if I insert empty line.

    I have tried many combinations of settings in Excel trust center but nothing works.

    Does anybody know what is going on?

    Link in the message also does not work.

    Thanks,

    I would like to add the following I have found when trying to clarify things.

    It is from Microsoft.

    Granting Trust to Office Solutions

    Granting trust to Office solutions means modifying the security policy of each target computer to trust the solution assembly, application manifest, deployment manifest, and document. Trust can be granted to the Office solution by either you or the end user.

    You can grant full trust to the Office solution by signing the application and deployment manifests.

    End users can grant trust to the Office solution by making a trust decision in the ClickOnce trust prompt.

    Applies to: The information in this topic applies to document-level projects and application-level projects for Office 2013 and Office 2010. See Features Available by Office Application and Project Type.

    All application and deployment manifests for Office solutions must be signed with a certificate that identifies the publisher. Certificates provide a basis for making trust decisions.

    A temporary certificate is created for you and granted trust at build time so the solution will run while you debug it. If you publish a solution that is signed with a temporary certificate, the end user will be prompted to make a trust decision.

    If you sign the solution with a known and trusted certificate, the solution will automatically be installed without prompting the end user to make a trust decision. For more information about how to obtain a certificate for signing, see ClickOnce and Authenticode. After a certificate is obtained, the certificate must be explicitly trusted by adding it to the Trusted Publishers list. For more information, see How to: Add a Trusted Publisher to a Client Computer for ClickOnce Applications.

    If a developer signs the solution with a temporary certificate, an administrator can re-sign the customization with a known and trusted certificate by using the Manifest Generation and Editing Tool (mage.exe), which is one of the Microsoft .NET Framework tools. For more information about signing solutions, see How to: Sign Office Solutions and How to: Sign Application and Deployment Manifests.


    This problem has been solved. Still if anybody knows literature about what is Windows/Office/Application policy in  general and suggestions how developer should implement it. I would appreciate if I get such suggestions (links).

    Thanks.

     
    • Edited by Fiut11 Sunday, July 30, 2017 10:59 PM
    Friday, July 28, 2017 1:05 PM

Answers

  • Hello,

    Since your issue has been resolved, i suggest you mark it as answer to close this thread.

    If you have any advise about MS development documents, i think you could submit your feedback on Office Dev User Voice site:https://officespdev.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Fiut11 Tuesday, August 1, 2017 3:05 AM
    Tuesday, August 1, 2017 1:34 AM

All replies

  • Hello,

    Please visit Securing Office Solutions: The first security check applies only to document-level solutions. The document of a document-level solution must be in a trusted location. 

    According to Granting Trust to Documents: Applications in Office 2013 and Office 2010 have Trust Centers where users can configure security and privacy settings, such as trusted locations. For Office solutions, the local computer is considered a trusted location. However, because of higher risk, there are certain directories that cannot ever be trusted, such as the temporary folders for the system, for each user, and for Internet Explorer.

    Please follow Create, remove, or change a trusted location for your files to add this document into trusted location.

    You could add your VS project folder into trusted location and check "Subfolders of this location are also trusted".

    If it doesnt work, please let me know.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Chenchen Li Monday, July 31, 2017 1:59 AM Screenshot
    Monday, July 31, 2017 1:58 AM
  • Celeste,

    Thank you for your comments. I have tried to put almost everything related to VS and Office into the trusted location. It did not work. I am not sure why. What was working was to add myself to trusted publishers.

    Right now I can run and debug my Excel application, but still I think MS should give users (people who write small applications) clear directions how to use security settings and comply with security requirements.

    For example what we suppose to use: trusted location or trusted publisher name? And how to make program complainant with MS requirements. What about differences between Office application and just applications?

    In my case things are working for now but I am not sure if I did security settings in correct way, so once again short document how developers should use trustworthy programming.

    Thanks,

    fiut11

     

    • Proposed as answer by Chenchen Li Tuesday, August 1, 2017 1:32 AM
    Monday, July 31, 2017 5:37 PM
  • Hello,

    Since your issue has been resolved, i suggest you mark it as answer to close this thread.

    If you have any advise about MS development documents, i think you could submit your feedback on Office Dev User Voice site:https://officespdev.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Fiut11 Tuesday, August 1, 2017 3:05 AM
    Tuesday, August 1, 2017 1:34 AM