1

While trying to connect to OpenX with the following code: (asp.net, c#)

IOpenXProxy proxy = (IOpenXProxy)XmlRpcProxyGen.Create(typeof(IOpenXProxy));
proxy.Url = "http://testserver.com/OpenX/www/api/v2/xmlrpc/";
proxy.Logon("username", "password");

I am getting an error message:

Response from server does not contain valid XML. "'--' is an unexpected token. The expected token is '>'. Line 31, position 3."

Using Fiddler it's possible to find out that the response I am getting is http://testserver.com/www/admin/index.php i.e. html login page. Because of that I am getting this error message. The question is what is wrong? Server settings?

Thank you

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
Elistan
  • 363
  • 1
  • 5
  • 13

2 Answers2

1

The link was wrong: should be "http://testserver.com/www/api/v2/xmlrpc/".

Elistan
  • 363
  • 1
  • 5
  • 13
1

See OpenX.NET to use OpenX from a .Net application. I recommend using ISession instead of IOpenXProxy

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275