Link to home
Start Free TrialLog in
Avatar of xedge88
xedge88

asked on

Document level vsto not deploy

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
Avatar of myaspnet
myaspnet
Flag of Saudi Arabia image

try use extension rtf instead of docx
Avatar of Nasir Razzaq
Make sure the security settings are right

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

ASKER

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.
Avatar of xedge88

ASKER

If 1 document can, it mean that location is trusted. But some how it doesn't.
Depends on what the code is trying to do.  Is the code same in all documents?
Avatar of xedge88

ASKER

Yup it is same
Avatar of xedge88

ASKER

Tried the solution, it does not work.
Avatar of xedge88

ASKER

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
Avatar of xedge88

ASKER

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...
Avatar of xedge88

ASKER

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
>How does I bypass this unblock and let vsto load successfully???

Did you try that Unblock button?
Avatar of xedge88

ASKER

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.
>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.
Avatar of xedge88

ASKER

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 -_-"
Avatar of xedge88

ASKER

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
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"
Avatar of xedge88

ASKER

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

How to do GPO for vsto?
Avatar of xedge88

ASKER

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

 NetFx40_LegacySecurityPolicy
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xedge88

ASKER

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.
Avatar of xedge88

ASKER

It was a security improvement that I suppose I need to live with it