Finally got to the root of the problem...
Request for the permission of type System.Net.WebPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
inside the GetEntity method
Fixed it by following:
public override object GetEntity(Uri absoluteUri, string role, Type
ofObjectToReturn)
{
if(absoluteUri.Scheme == "http")
{
System.Net.WebPermission p = new
System.Net.WebPermission(System.Security.Permissio ns.PermissionState.Unrestricted);
p.Assert();
return base.GetEntity(absoluteUri, role, ofObjectToReturn);
}
else
{
return base.GetEntity(absoluteUri, role, ofObjectToReturn);
}
}
Of course in real life one should do better than PermissionState.Unrestricted.
Michael