Friday, December 16, 2005

Creating partial trust applications with Visual Studio 2005

Today I found out that the new Visual Studio 2005 gives to its developers the means to easily build partial trust applications. So far, most of the .NET based applications are full trust, basically because it is really cumbersome to define all the required permissions and enumerate them declaratively, as it should be done with Visual Studio .NET 2003 for example.

What you have with Visual Studio 2005, is the "Security" tab in the Project properties dialog. There you can easily enable "Enable ClickOnce Security Settings" and select "This a partial trust application". The next step is to "calculate" the permissions that your code requires. A, there is something else you should pay attention - if you want to calculate the minimum permissions set, be sure to select the Custom zone from the "Zone your application will be installed from".

No comments: