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

推荐订阅源

Last Week in AI
Last Week in AI
D
DataBreaches.Net
腾讯CDC
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
罗磊的独立博客
月光博客
月光博客
MyScale Blog
MyScale Blog
U
Unit 42
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
G
Google Developers Blog
博客园 - 【当耐特】
D
Docker
I
InfoQ
雷峰网
雷峰网

博客园 - 有些伤感

another year Good luck to my little brother Happy birthday to me Bye Bye Bye 近来的几件事 《猜火车》(Trainspotting)-- What is you choise 猫,狗及其它 《剪刀手爱德华》(Edward Scissorhands )-- I can't Web开发难题暨解决方法研讨会 《杀出个黎明》(From Dusk Till Dawn)--This is the fucking movie 《末路狂花》(Thelma & Louise)-- Be sweet to your wife 代友招人 在网页上启动你的应用程序 每个人都有自己的困扰 IBM SOA解决方案 WPF/WPFE笔记(一):准备工作 祝大家新年快乐 项目快完了 最近我在做什么?
WebService异常
有些伤感 · 2007-07-31 · via 博客园 - 有些伤感

如果你通过Winform程序调用WebService时收到以下异常:

System.Net.WebException: The operation has timed-out.

可以尝试在Reference.cs里添加:

protected override System.Net.WebRequest GetWebRequest(Uri uri)
  {
   System.Net.HttpWebRequest webRequest =
    (System.Net.HttpWebRequest) base.GetWebRequest(uri);
   webRequest.KeepAlive = false;
   return webRequest;
  }
来解决。