InterviewSolution
| 1. |
How Do I Supply Authentication Credentials? |
|
Answer» Proxy classes are derived from IXmlRpcProxy and so inherit a Credentials property. This is used where the XML-RPC server AUTHENTICATES the caller. The property is used in exactly the same way as the same property of the System.Net.WebRequest class. For EXAMPLE: ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(typeof(ISumAndDiff)); proxy.Credentials = NEW NetworkCredential("jsmith","PASSWORD"); SumAndDiffValue ret = proxy.SumAndDifference(2, 3); Proxy classes are derived from IXmlRpcProxy and so inherit a Credentials property. This is used where the XML-RPC server authenticates the caller. The property is used in exactly the same way as the same property of the System.Net.WebRequest class. For example: ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(typeof(ISumAndDiff)); proxy.Credentials = new NetworkCredential("jsmith","password"); SumAndDiffValue ret = proxy.SumAndDifference(2, 3); |
|