Cook Computing

A while ago I posted

May 6, 2002 Written by Charles Cook

A while ago I posted some proof of concept code on the XMLRPCNET list for using the .NET RealProxy class to generate automatically XML-RPC proxies. This would save some work in implementing an XML-RPC proxy - it would only be necessary to define an interface and not implement a call to Invoke for each method.

However I came across this posting on the .NET list which describes how Remoting does not work in a partially trusted scenario. This suggested that there might be similar problems with using RealProxy. So I placed the sample code in a WinForms application and tested running it from an Internet site with various code access security permissions. Through trial and error I discovered that the following permissions are the minumum permission set for running the RealProxy sample code:

  • Security - Enable assembly execution
  • Security - Allow calls to unmanaged assemblies
  • Security - Extend infrastructure

The first of these is obviously required for any code but the other two are a bit more obscure. Anyway, this means that the RealProxy approach is not worth pursuing, and I suspect any other custom approach which involves code generating proxy code at runtime is going to run into similar problems.