Professional Support

Get professional support quickly from the people who create and maintain 51Degrees.mobi.

Professional Support
How Much Faster is 51Degrees.mobi Framework?
Watch Speed Comparison Loading the same picture on the same mobile device, with the same network connection, over twice as fast.
Watch Video
Welcome to the 51Degrees.mobi online community. These forums offer the opportunity for you to discuss support topics with your peers and with members of the 51Degrees.mobi development team.
HomeHome51Degrees.mobi ...51Degrees.mobi ...51Degrees.mobi ...51Degrees.mobi ...MobileCapabilitiesProvider ignores <browserCaps> section in web.configMobileCapabilitiesProvider ignores <browserCaps> section in web.config
Previous
 
Next
New Post
3/28/2012 11:24 AM
 
Hi,

we have section defined in our web.config file. It allows us to know whether a request is made by a search engine or not (Request.Browser.Crawler property). It works fine when we do not use 51degrees assembly. But when we use it, then FiftyOne.Foundation.Mobile.Detection.MobileCapabilitiesProvider is registered as our HttpCapabilitiesBase.BrowserCapabilitiesProvider and it just ignores it. Please fix it in one of the further releases.

Or it would be great if 51degrees could support this property (maintain your own database of search engines).
Find more info here: http://msdn.microsoft.com/en-us/library/sk9az15a.aspx
and here: http://www.codeproject.com/KB/aspnet/browsercaps.aspx
the latest version of browsercaps visit http://browsers.garykeith.com/index.asp
 
New Post
5/21/2012 3:50 PM
 
Any update on this? Could you please have a look at this issue? It's really important for us to use "browserCaps" section in web.config
 
New Post
5/21/2012 3:53 PM
 
BTW, it could be great if 51degrees can determine whether request is done by a search engine. It'll move this great product to the next level.

P.S. I know that 51degrees has "crawler" property but it just doesn't work. It returns false for all famous search engine headers
 
New Post
5/21/2012 4:53 PM
 
Regarding "Crawler" property. After some digging into source code I've found that 51degrees overrides the default "Crawler" property. If we have a look at "GetBrowserCapabilities" method of "MobileCapabilitiesProvider" ("FiftyOne.Foundation.Mobile.Detection" namespace), then we see that:
1. "baseCapabilities" variable contains valid value of "Crawler" property (based on my browserCaps section)
2. But "overrideCapabilities" variable already overrides this "Crawler" property with 51degrees' "always false"

Could you please fix it in the next release?
 
New Post
5/29/2012 12:00 PM
 

In the next version 2.1.6.X we'll replace the GetIsCrawler method of the MobileCapabilities.cs class with the following code.

/// <summary>
/// If the data set does not contain the IsCrawler property null is returned.
/// If it is present and contains the value true or false then a value
/// is returned.
/// </summary>
/// <param name="device"></param>
/// <returns></returns>
private string GetIsCrawler(BaseDeviceInfo device)
{
    var value = device.GetFirstPropertyValueStringIndex(IsCrawler);
    if (value == this.True[0] || value == this.True[1])
        return bool.TrueString.ToLowerInvariant();
    if (value == this.False[0] || value == this.False[1])
        return bool.FalseString.ToLowerInvariant();
    return null;
}

This will now return Null if the value isn't in the database and will therefore not override the value from BrowserCaps.

Thank you for making us aware of the issue.

James

 
Previous
 
Next
HomeHome51Degrees.mobi ...51Degrees.mobi ...51Degrees.mobi ...51Degrees.mobi ...MobileCapabilitiesProvider ignores <browserCaps> section in web.configMobileCapabilitiesProvider ignores <browserCaps> section in web.config