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 ...Facebook User Agent being detected as Mobi DeviceFacebook User Agent being detected as Mobi Device
Previous
 
Next
New Post
1/23/2012 1:37 PM
 
Hi All

I have a urgent and serious issue. The Facebook like scraper with user agent: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

This is being picked up as  MOBI device and redirecting to MOBI when users "Like" the page.

1) How do I fix this?
2) Is there somewhere to specify this useragent is not a mobi device?

Regards,

S
 
New Post
1/23/2012 2:02 PM
 
Hi,

Thanks for your question. Do you know what version of the data you are using? I have tried the useragent you have given with our latest data and it appears to be a non mobile, here.

You can download the latest data from Codeplex. Does this help your problem?

Thanks,
Tom
 
New Post
1/23/2012 2:22 PM
 
Hi Tom

The file is: 51Degrees.mobi-Lite-2012.01.18.dat
Below is the log:

2012-01-23T14:11:02.2570760Z - 3120 - Debug - Disposing Redirection Module
2012-01-23T14:11:11.9914931Z - 3120 - Debug - Getting 'fiftyOne/redirect' configuration from file 'D:\Sites\sitename.electricocean.co\App_Data\51Degrees.mobi.config'.
2012-01-23T14:11:12.0070931Z - 3120 - Debug - Constructing MobileCapabilitiesProvider - Default
2012-01-23T14:11:16.8899017Z - 3120 - Debug - Initialising redirection module
2012-01-23T14:11:16.9055017Z - 3120 - Debug - Initialising redirection module static fields.
2012-01-23T14:11:16.9055017Z - 3120 - Debug - Initialising redirection module event handlers
2012-01-23T14:11:16.9055017Z - 3120 - Debug - Initialising redirection module
2012-01-23T14:11:16.9055017Z - 3120 - Debug - Initialising redirection module event handlers
2012-01-23T14:11:16.9523018Z - 3120 - Debug - Getting 'fiftyOne/detection' configuration from file 'D:\Sites\sitename.electricocean.co\App_Data\51Degrees.mobi.config'.
2012-01-23T14:11:16.9523018Z - 3120 - Debug - Creating provider from embedded device data 'FiftyOne.Foundation.Mobile.Detection.Binary.Resources.51Degrees.mobi-Lite.dat'.
2012-01-23T14:11:17.2955024Z - 3120 - Info - Created provider from embedded device data 'FiftyOne.Foundation.Mobile.Detection.Binary.Resources.51Degrees.mobi-Lite.dat'.
2012-01-23T14:11:18.2315041Z - 3120 - Debug - Request for 'http://sitename.electricocean.co/' with handler type 'System.Web.Mvc.MvcHandler' and current page '' is not a restricted page for redirect.
2012-01-23T14:11:18.2315041Z - 3120 - Debug - Redirecting device with useragent 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' from url 'http://sitename.electricocean.co/' to '~/mobi' due to 'default'.
2012-01-23T14:11:26.3279183Z - 3120 - Debug - Request for 'http://sitename.electricocean.co/' with handler type 'System.Web.Mvc.MvcHandler' and current page '' is not a restricted page for redirect.
2012-01-23T14:11:26.3279183Z - 3120 - Debug - Redirecting device with useragent 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' from url 'http://sitename.electricocean.co/' to '~/mobi' due to 'default'.

Really need help as this is urgent
 
New Post
1/23/2012 2:34 PM
 
The Facebook crawler was added in a recent update, you will need the new data file before it will be identified properly.

You can download the latest data file from here, you should place it into your website's App_Data folder. Then modify your web.config to contain this line in the <fiftyOne> element (there will probably already be a line like it commented out).

<detection name="data" binaryFilePath="~/App_Data/51Degrees.mobi-Lite-2012.01.18.dat" enabled="true" />

You may then need to restart your site's AppPool.

I hope this helps,
Tom
 
New Post
1/23/2012 2:51 PM
 
Thanks for the post Tom. Tried it, reset iis and app pool and have this in the log:

2012-01-23T14:49:24.6505200Z - 1564 - Debug - Disposing Redirection Module
2012-01-23T14:50:07.2385948Z - 3968 - Debug - Getting 'fiftyOne/redirect' configuration from file 'D:\Sites\samsungafcon.electricocean.co\App_Data\51Degrees.mobi.config'.
2012-01-23T14:50:07.2541948Z - 3968 - Debug - Constructing MobileCapabilitiesProvider - Default
2012-01-23T14:50:12.1526034Z - 3968 - Debug - Initialising redirection module
2012-01-23T14:50:12.1682035Z - 3968 - Debug - Initialising redirection module static fields.
2012-01-23T14:50:12.1682035Z - 3968 - Debug - Initialising redirection module event handlers
2012-01-23T14:50:12.1682035Z - 3968 - Debug - Initialising redirection module
2012-01-23T14:50:12.1682035Z - 3968 - Debug - Initialising redirection module event handlers
2012-01-23T14:50:12.2150035Z - 3968 - Debug - Getting 'fiftyOne/detection' configuration from file 'D:\Sites\samsungafcon.electricocean.co\App_Data\51Degrees.mobi.config'.
2012-01-23T14:50:12.2150035Z - 3968 - Info - Creating provider from binary data file 'D:\Sites\samsungafcon.electricocean.co\App_Data\51Degrees.mobi-Lite-2012.01.18.dat'.
2012-01-23T14:50:12.6830044Z - 3968 - Info - Created provider from binary data file 'D:\Sites\samsungafcon.electricocean.co\App_Data\51Degrees.mobi-Lite-2012.01.18.dat'.
2012-01-23T14:50:19.1258157Z - 3968 - Debug - Initialising redirection module
2012-01-23T14:50:19.1258157Z - 3968 - Debug - Initialising redirection module event handlers
2012-01-23T14:50:19.1258157Z - 3968 - Debug - Initialising redirection module
2012-01-23T14:50:19.1258157Z - 3968 - Debug - Initialising redirection module event handlers
2012-01-23T14:51:04.4438953Z - 3968 - Debug - Request for 'http://samsungafcon.electricocean.co/' with handler type 'System.Web.Mvc.MvcHandler' and current page '' is not a restricted page for redirect.
2012-01-23T14:51:04.4438953Z - 3968 - Debug - Redirecting device with useragent 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' from url 'http://samsungafcon.electricocean.co/' to '~/mobi' due to 'default'.
2012-01-23T14:51:30.4647410Z - 3968 - Debug - Request for 'http://samsungafcon.electricocean.co/' with handler type 'System.Web.Mvc.MvcHandler' and current page '' is not a restricted page for redirect.
2012-01-23T14:51:30.4647410Z - 3968 - Debug - Redirecting device with useragent 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' from url 'http://samsungafcon.electricocean.co/' to '~/mobi' due to 'default'.
2012-01-23T14:51:37.2351529Z - 3968 - Debug - Disposing Redirection Module


I have the following data file ~/App_Data/51Degrees.mobi-Lite-2012.01.18.dat

This is the config file there too:














mobileHomePageUrl="~/mobi"
timeout="20"
devicesFile="~/App_Data/51Degrees.mobi-Lite-2012.01.18.dat"
mobilePagesRegex="mobi">




 
Previous
 
Next
HomeHome51Degrees.mobi ...51Degrees.mobi ...51degrees.mobi ...51degrees.mobi ...Facebook User Agent being detected as Mobi DeviceFacebook User Agent being detected as Mobi Device