Question

In my web project I have to serve ads through our openx server but after searching for documentation on how to implement openx's API on .NET, I haven't found anything. Does anyone know how to implement their API on .NET and how to serve ads through it? Documentation is appreciated.

Note: I have done my searches and I didn't find anything relating this matter. Using their own API is a priority to third parties API.

EDIT:

Public Class OpenXAdsProcessor

    Dim session As OpenXNet.ISession
    Dim s As IOpenXProxy

    Public Sub New()

        s = CookComputing.XmlRpc.XmlRpcProxyGen.Create(Of IOpenXProxy)()
        s.Url = "ourserverurl/www/api/v1/xmlrpc/LogonXmlRpcService.php"        
        s.XmlRpcMethod = "logon"

        session = New SessionImpl(s, "username", "password")

    End Sub
End Class

Above I am implementing OpenX API. Right now I'm waiting to get permissions for my user because the server returned "Server returned a fault exception: [801] User must be OA installation admin" on my attempt to login.

Will the above code suffice to make use of your API?

Was it helpful?

Solution

I'm the author of OpenX.NET. If you just need to serve OpenX ads in a web application, you don't need to use these API bindings. Just place the OpenX javascript in your web page.

If you really need to use the API for other kind of scenarios and are new to OpenX, I recommend first getting familiar with OpenX concepts, see the OpenX Developer Zone. Then see some OpenX.NET tests. OpenX.NET is a 1-to-1 mapping to OpenX entities and methods.

EDIT: unless you want to debug something or really know what you're doing, you never need to handle the proxy directly. Simply use the session constructor:

SessionImpl(string username, string password, string url)

The URL is the root URL for the OpenX v2 API, e.g. http://localhost:10002/openx/api/v2/xmlrpc/, see the sample app.config in the tests.

OTHER TIPS

There are some bindings available for .NET.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top