Server encountered an internal error. For more information, turn on customErrors

"eg_breakup" <[email protected]> Tue, 05 Sep 2006 22:10:28 -0000
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
Hi,

I am new to xml-rpc.  I have written a server in C#.net and I am 
using that in a webpage.  Both rpc server and the aspx are on the 
same webserver.

When I debug, I get the exception "Server encountered an internal 
error. For more information, turn on customErrors" when I make a 
method call on the rpc server.

From the IE, if I make the call 
http://localhost/xmlrpctest/SumAndDiff.rem  I 
get "System.Runtime.Remoting.RemotingException: Requested Service 
not found".

//Server code

namespace CallaWay
{	
	public struct SumAndDiffValue 
	{
		public int sum; 
		public int difference; 
	}

	/// <summary>
	/// Summary description for SimpleMathServer.
	/// </summary>
	/// 
    [XmlRpcService(AutoDocVersion=false)]
	public class SimpleMathServer : XmlRpcService
	{
		[XmlRpcMethod("CallaWay.SumAndDifference")] 
		public SumAndDiffValue SumAndDifference(int x, int 
y) 
		{ 
			SumAndDiffValue ret; 
			ret.sum = x + y; 
			ret.difference = x - y; 
			return ret; 
		} 

	}

	[XmlRpcUrl("http://localhost/xmlrpctest/SumAndDiff.rem")]
	public interface ISumAndDiff: IXmlRpcProxy
	{ 
		[XmlRpcMethod("CallaWay.SumAndDifference")] 
		SumAndDiffValue SumAndDifference(int x, int y); 
	}
}


//Client code in aspx page

ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(typeof
(ISumAndDiff));
			SumAndDiffValue ret;
			ret.sum = 0;
			ret.difference = 0;

			try
			{
				ret = proxy.SumAndDifference(2, 3);
			}
			catch(Exception ex)
			{
				lblresult.Text = ex.Message; 
			}
			lblresult.Text = "Sum=" + ret.sum.ToString() 
+ " Diff="+ret.difference.ToString(); 


//web.config
.....
.....
<httpHandlers>
           <add verb="*" 
path="http://localhost/xmlrpctest/SumAndDiff.rem"
         type="CallaWay.SimpleMathServer, 
CallaWay.SimpleMathServer" />
    </httpHandlers>
 </system.web>


Does anybody have any idea why Iam getting this error.  I am 
using .net 1.1.4322

Thanks,








 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/