Share via


While clicking on “Calculate Permissions” button after including “WebPermission” for a partial trust application, prompts a message box “This application requires full trust to run correctly. Would you like to set this as a full trust application?”

I created a windows application and added a .net web service reference. Under partial trust application if we click on “Calculate Permissions” button after including webpermission, it prompts with a message box "This application requires full trust to run correctly. Would you like to set this as a full trust application?"

By default, an application deployed via ClickOnce runs under Full Trust. Under Full Trust, the application has unrestricted access to resources such as files, registry, as well as network. This can be potentially dangerous as it opens the possibility of your code being exploited by malicious code.

If you set the WebPermission's Settings to Include and calculate the permissions, you will notice that the icon now changes to an exclamation mark inside a yellow triangle, signifying that this operation requires elevated permission to execute. Now click on the “Advanced…” button, permission is granted to the application to access its site of origin.

ClickOnce 

Note: If the application tries to access a Web service hosted on a remote server, a security exception will be raised. To prevent this, just set the “WebPermission” permission to Include.