.NET application with Office PIA and SecurityException

139 views Asked by At

I have a c# application that uses the Office PIAs to enable the application to export data to an Excel file. This works great on my development machine and other desktop machines.

When I run the application on a Terminal Server (which has Office available) I get a SecurityException and the application crashes. The debugger recommends I read up on security permissions and distributing office apps.

Going through this documentation, it seems to mostly pertain to writing add-ins for the Office suite instead of using their functionality.

Is there a tutorial that I can follow so I can preserve this functionality or at the very least prevent the crash? Due to deployment issues I'd like to avoid modifying the .NET system policies if possible.

1

There are 1 answers

1
Joe On

Could it simply be that your application is running from a network share when on Terminal Server, so doesn't have full trust?

In which case you could try giving the location the application is installed at full trust - google for CASPOL for more info.