HttpBrowserCapabilities.Crawler财产.NET [英] HttpBrowserCapabilities.Crawler property .NET

查看:196
本文介绍了HttpBrowserCapabilities.Crawler财产.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何进行HttpBrowserCapabilities.Crawler属性(<一href="http://msdn.microsoft.com/en-us/library/aa332775">http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx)工作的?我需要检测合作伙伴的定制履带并且此属性返回false。

How does the HttpBrowserCapabilities.Crawler property (http://msdn.microsoft.com/en-us/library/aa332775(VS.71).aspx) work? I need to detect a partner's custom crawler and this property is returning false.

在哪里/我如何添加他的用户代理,以使此属性将返回true?创建自己的用户代理检测机构以外的任何其他方式?

Where/How can I add his user agent so that this property will return true? Any other way outside of creating my own user agent detecting mechanism?

推荐答案

这是所有的带动下,默认的browserCaps声明的是.NET Framework的一部分。

This is all driven by the default browsercaps declarations that are part of the .NET framework.

要设置这个特定的履带,则需要自定义的browserCaps部分添加到您的web.config文件,以确定它作为一个履带式。

To setup this specific crawler, you would need to add a custom browserCaps section to your web.config to identify it as a crawler.

在如何去这样做的MSDN文档是pretty的有据可查的,在这里是一个链接。

The MSDN documentation on how to go about this is pretty well documented, here is a link.

这篇关于HttpBrowserCapabilities.Crawler财产.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆