It is at WebWorkContext.CurrentCustomer's part.

                //check whether request is made by a search engine
//in this case return built-in customer record for search engines
//or comment the following two lines of code in order to disable this functionality
if (customer == null || customer.Deleted || !customer.Active)
{
if (_userAgentHelper.IsSearchEngine())
customer = _customerService.GetCustomerBySystemName(SystemCustomerNames.SearchEngine);
} and to _userAgentHelper.IsSearchEngine() /// <summary>
/// Get a value indicating whether the request is made by search engine (web crawler)
/// </summary>
/// <returns>Result</returns>
public virtual bool IsSearchEngine()
{
if (_httpContext == null)
return false; //we put required logic in try-catch block
//more info: http://www.nopcommerce.com/boards/t/17711/unhandled-exception-request-is-not-available-in-this-context.aspx (I checked this page, but the url is not valid now) bool result = false;
try
{
var uasParser = GetUasParser();
var userAgent = _httpContext.Request.UserAgent;
result = uasParser.IsBot(userAgent);
//result = context.Request.Browser.Crawler;
}
catch (Exception exc)
{
Debug.WriteLine(exc);
}
return result;
} and to var uasParser = GetUasParser(); protected virtual UasParser GetUasParser()
{
if (Singleton<UasParser>.Instance == null)
{
//no database created
if (String.IsNullOrEmpty(_config.UserAgentStringsPath))
//UNDONE: maybe, throw an exception?
return null; var filePath = _webHelper.MapPath(_config.UserAgentStringsPath);
var uasParser = new UasParser(filePath);
Singleton<UasParser>.Instance = uasParser;
}
return Singleton<UasParser>.Instance;
}

This library is used to parse information about user agents located at \App_Data\uas_20140809-02.ini file. Both of them (DLL and INI files) were downloaded at http://user-agent-string.info (was available for free). Now I see that this project is moved to https://udger.com/ on November 2014 with sone new pricing options. I've jusy contacted them trying to understand whether we can continue usage of the new project (still looking forward for reply)

这个库是用来解析用户代理信息 位于\ App_Data \ uas_20140809-02。ini文件。(DLL和INI文件)在http://user-agent-string.info下载(免费)。

我看到这个项目转到https://udger.com/在2014年11月重新的定价方案。我jusy联系他们试图了解我们是否可以继续使用新项目(仍然期待回复)

http://blog.csdn.net/defonds/article/details/8128165

最新文章

  1. iOS UIApplication sharedapplication用法
  2. atitit. groupby linq的实现(1)-----linq框架选型 java .net php
  3. 第一个Nodejs程序
  4. CPC23-4 K.喵喵的神&#183;数
  5. 一周学会Mootools 1.4中文教程:(4)类型
  6. c#注释
  7. 什么是RESTful?
  8. Spring Boot 定时任务的使用
  9. vue 组件传值
  10. 华为PAY公交卡建议开卡免费!
  11. 【转】ADO.Net对Oracle数据库的操作
  12. python3 rrdtool 使用
  13. es6入门set和map
  14. 【代码审计】XIAOCMS_后台database.php页面存在SQL注入漏洞
  15. 4518: [Sdoi2016]征途
  16. Ubuntu CEPH快速安装
  17. springboot(十四)-分库分表-自动配置
  18. 自己在UWP程序上调用usb转串口的路程
  19. 大聊PYthon----生成器
  20. Cyclic Nacklace ---hdu3746(循环节,kmp)

热门文章

  1. javascript跑马灯抽奖
  2. HDU-4720 Naive and Silly Muggles 圆的外心
  3. TreeMap实现原理
  4. Java Thread.interrupt 害人! 中断JAVA线程(zz)
  5. Java邮件服务学习之四:邮箱服务客户端Spring Mail
  6. HDU 4370 0 or 1 (最短路+最小环)
  7. HDU 5676 ztr loves lucky numbers (模拟)
  8. Java IO (5) - 总结
  9. poj 1543 Perfect Cubes(注意剪枝)
  10. osx升级到10.10后,用pod install报错最终解决办法