WURFL HttpListener

Christophe
Posts: 1
Joined: Tue Mar 27, 2012 9:46 am

WURFL HttpListener

Postby Christophe » Wed Mar 28, 2012 3:40 am

Hello,
I have a c# server that use Httplistener. In header there was userAgent and i used the web service "http://www.wurflws.com/wurflws?ua=" to obtain capabilities for this userAgent. But now it doesn't work. I tried with the cloud (free account) :

Code: Select all

public DeviceInfo getDataByRequest(HttpListenerContext context)
        {
            var config = new DefaultCloudClientConfig
            {
                ApiKey = MY_APIKEY;
            };

            var manager = new CloudClientManager(config);
            CloudClientManager.GetDeviceFromUserAgent            
                        // Grab data
            var info = manager.GetDeviceInfo(context, new[] { "resolution_width", "resolution_height" });
            foreach (KeyValuePair<string, string> pair in info.Capabilities)
	        {
	            ...
	        }
            return info;
        }
i can't parse HttpListenerContext to HttpContext, so i tried a local solution with WURFL DLL :

Code: Select all

WURFL.WURFLManager wurlfManager;// How initialize
            var device = wurlfManager.GetDeviceForRequest(userAgent);
            var caps = device.GetCapabilities();
How initialize WURFLManager ?

Christophe

sm_support2
Posts: 294
Joined: Mon Jun 20, 2011 5:04 pm

Re: WURFL HttpListener

Postby sm_support2 » Wed Mar 28, 2012 7:25 am

that Web Service has been removed because it had been deployed in breach of the WURFL license.

You can use the ScientiaMobile WURFL Cloud instead. We have a free offering for two capabilities and up to 5000 detections:

http://www.scientiamobile.com/cloud


Who is online

Users browsing this forum: Google [Bot] and 9 guests