We help IT Professionals succeed at work.

Document level vsto not deploy

294 Views
Last Modified: 2012-05-11
I had a word document level VB.net VSTO that is developed in Visual Studio 2008. It was working well with deployment on client machine.

Recently I bring the current project into Visual Studio 2010, when I deploy the same project to client machine. I get the attached error. The most strange thing is some document having this problem, and some are not. I been trying this for the past 2 days and totally lost in what do with it.

Is it because I missed out in some area while bring it to Visual Studio 2010??? Best part is all the document (inclusive of working/not working) are all in the same folder on my local machine.

aaa.jpg
Comment
Watch Question

Commented:
try use extension rtf instead of docx
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Make sure the security settings are right

http://msdn.microsoft.com/en-us/magazine/ee677170.aspx

Author

Commented:
Using rtf is not the solution to the root.
Why is that some document work and some do not where they are all in the same location.

Author

Commented:
If 1 document can, it mean that location is trusted. But some how it doesn't.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Depends on what the code is trying to do.  Is the code same in all documents?

Author

Commented:
Yup it is same

Author

Commented:
Tried the solution, it does not work.

Author

Commented:
I have the exact same probem as the guy below:

http://www.dotnet247.com/247reference/msgs/58/294563.aspx

Seem like I am not alone

Author

Commented:
I found 2 very interesting behaviour. If I target the compile framework to 3.5, I had no problem running it at all. But when target to framework 4.0, I am having the issue. I need to target 4.0, someone help...

Author

Commented:
I found out vsto loaded failed is because the security of the file is blocked. How does I bypass this unblock and let vsto load successfully???

I had attached the screenshot of how it look like. I realised when in .Net Framework 3.5, even it is blocked, vsto can still load but not .Net Framework 4.0

Author

Commented:
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
>How does I bypass this unblock and let vsto load successfully???

Did you try that Unblock button?

Author

Commented:
Yup unlock button help to load it successfully.

But in net framework 3.5, even if it is locked it can still fire up. but in .net framework 4.0, it does not able to fire up.

I cant let user always unlock each file they download.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
>But in net framework 3.5, even if it is locked it can still fire up. but in .net framework 4.0, it does not able to fire up.

I think its all down to security policy.

>I cant let user always unlock each file they download.
That is the reason for having security. Otherwise, anyone can use an Office file to infect a computer without user even knowing it.

Author

Commented:
Yup, I understand that. Is there a way I can make it work like how .net framework 3.5 secruity but target to framework 4.0??? I know this sound a bit silly

I just want my vsto to be able to run without always clicking unlock -_-"
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:

Author

Commented:
How do I make it work...? The link dun seem to show sample of what 2 do. Does it mean tat mi implement it during runtime or during installation? Sorrie do not quite get where 2 start with the link
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
It has to be done on the computer where it is running. If its a domain environment, I think it can be set using the GPO. Otherwise, "Local Security Policy" in Administrative Tools"

Author

Commented:
I need a way to that are not via Administrative tool.

How to do GPO for vsto?

Author

Commented:
what abt this??? Would this help??? I read something abt the below, but do not know whether it will work or use.

 NetFx40_LegacySecurityPolicy
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
It does not work. Anyway thanks guys, think I would just live with it and have user to trust it as trusted site so when file is downloaded from internet, the file wont be locked.

Author

Commented:
It was a security improvement that I suppose I need to live with it
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.