wiki:CasPol

CasPol

The web service client won't work unless you give full trust to the config file plutext.client.word2007.dll.config.

The symptom is that Output will say WSE032: There was an error loading the microsoft.web.services3 configuration section

I'm not sure whether this is still a problem with Visual Studio 2008.

The Cure

From the Visual Studio 2005 Command Prompt, type:

caspol -l

Take a note of the number for "All code: FullTrust". For example, on XP, it may be "1.1" (Zone: My Computer Full Trust); on Vista, I already had a code group in "All code: FullTrust" corresponding to plutext-client-word2007" at "1.1.4.1", so I used that.

Now run:

caspol -ag 1.1.4.1 -url C:\Users\jharrop\Documents\test-20071204\plutext-word2007-solution\plutext-client-word2007\bin\Debug\plutext.client.word2007.dll.config FullTrust

(getting the number right, and the path to plutext.client.word2007.dll.config correct; don't forget either the '.config' or the 'FullTrust' argument).

Note re XP: you don't need to encode spaces in the URL - just put the argument in quotes, for example: "c:\Documents and Settings\Jason Harrop\My Documents\plutext-word2007-solution\plutext-client-word2007\bin\Debug\plutext.client.word2007.dll.config"

For more information, please see  this VSTO forum post.