We are currently experiencing a problem with deploying a VSTO 2003
solution (Excel Workbook). The following will describe our problem...
Deployment model:
Excel workbook locally
.NET assembly on a web server (with referenced assemblies and config
file)
The custom property (_AssemblyLocation0) of the workbook points to the
URL where the .NET assembly is hosted. FullTrust has been granted (at
the Machine level) to the URL where the assembly is hosted.
This works fine when a user with local admin rights on the computer
opens the Excel workbook. However, when a non-admin (domain or local
to the machine) user opens the workbook, the solution fails with the
following error message...
"The current .NET security policy does not permit *** to run from the
folder ***. Do not change the security policy in your computer. The
.NET security policy is controlled by your administrator or the
developer who wrote the custom macros. You can still edit and save the
document. Contact your administrator or the author of the document for
further assistance".
The error generally points to trust not being established properly.
However, since this was established at the machine level and it worked
for the admin user, I cannot see any reason why this would be different
for the non-admin user.
This problem cannot be duplicated on our development machines. This
problem only occurs on PCs which are on the client's domain. This
leads me to believe that there is something in the client's Active
Directory Group Policy or with the way the machines are setup that is
causing this problem. However, the client has not been able to track
anything down and we have limited access to the necessary resources to
troubleshoot this problem.
Another point to note is that we copied the DLLs to the client computer
and modified the workbook to ensure that the _AssemblyLocation0 custom
property now pointed to the local drive where the DLLs were copied. We
also setup Full trust for the local drive and got the exact same error.
We are looking for any suggestions that might point us in the right
direction as to what could be causing this, how to diagnose it, how to
correct it, etc.?
Thanks in advance!
MMJ - 19 Apr 2006 06:39 GMT
try granting full trust on user level!
Muhammad Mohtashim Jangda
> We are currently experiencing a problem with deploying a VSTO 2003
> solution (Excel Workbook). The following will describe our problem...
[quoted text clipped - 44 lines]
>
> Thanks in advance!
Harry Miller [MSFT] - 19 Apr 2006 16:17 GMT
Well, if the assembly is in a network location, you have to grant trust at
the Machine level for it to work--User level only works if the assembly is
on the user's computer. It does sound like something in the security policy
prevents code from running, and overrides the Machine settings that you are
adding. I don't know enough about security to help, though--have you tried
one of the Microsoft Forums, like:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=16&SiteID=1
or
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=44&SiteID=1

Signature
Harry Miller
This posting is provided "AS IS" with no warranties, and confers no rights.
> try granting full trust on user level!
> Muhammad Mohtashim Jangda
[quoted text clipped - 47 lines]
> >
> > Thanks in advance!