惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Troy Hunt's Blog
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
F
Full Disclosure
Recorded Future
Recorded Future
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
博客园_首页
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hacker News: Front Page
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
博客园 - 司徒正美
Webroot Blog
Webroot Blog
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security
Cloudbric
Cloudbric
PCI Perspectives
PCI Perspectives
有赞技术团队
有赞技术团队
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
L
Lohrmann on Cybersecurity
量子位
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tailwind CSS Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
N
News and Events Feed by Topic
罗磊的独立博客
T
Threat Research - Cisco Blogs
Schneier on Security
Schneier on Security
T
Tor Project blog
IT之家
IT之家
M
MIT News - Artificial intelligence
S
Security @ Cisco Blogs
O
OpenAI News
AI
AI
S
Securelist
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
月光博客
月光博客
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题

博客园 - 徘徊中的海鸟

在Dictionary使用foreach的注意 ADO.NET,连接\连接池问题 - 徘徊中的海鸟 - 博客园 关于sql server占用系统资源的问题 ASP.NET 的内存不足问题 SQL拆分字段 生成代码自动加入到解决方案中 SQL Server 2005数据库日志文件损坏的情况下如何恢复数据库 .net 发现的cache 问题 .NET线程若干问题 HttpContext.Cache 和 HttpRuntime.Cache IIS 6.0中配置HTTP Gzip压缩 pre标签自动换行方案 TestDirector 安装、使用心得 连接数问题 w3wp 进程问题 关于CultureInfo 读取树数据SQL 提高sql的效率 SQL中只获取日期值
HttpWebRequest 和 浏览器打开的区别
徘徊中的海鸟 · 2007-07-23 · via 博客园 - 徘徊中的海鸟

通过两种不同的方式去打开一个网页,使用下面的方法打开的时候,网站报告错误,提示的大意显然是为了防止恶意下载,做了保护,但是同样的uRL放到IE中则显示完全正常,这两种方式获取网页的内容有什么区别能导致这样的结果?倒是一种保护资源的方式,请高手赐教了。    
   
  Dim   request   As   HttpWebRequest  
    request   =   CType(WebRequest.Create(url),   HttpWebRequest)  
    Dim   response   As   HttpWebResponse  
    response   =   CType(request.GetResponse,   HttpWebResponse)  
    Dim   sr   As   New   StreamReader(response.GetResponseStream,   Encoding.Default)  
    temptext   =   sr.ReadToEnd  
    sr.Close()

在很多网站为了防止恶意下载,或者恶意抓取网站信息。对HTTP请求的做了处理,
如对没有浏览器信息的请求进行屏蔽。
解决方法:
request.UserAgent   =   "Mozilla/4.0   (compatible;   MSIE   6.0;   Windows   NT   5.1)";