"Unable to load DLL 'rasapi32.dll'"异常的解决方法

by Jason 2008-05-19, 13:21
某些ASP.NET 2.0虚拟主机空间在调用派生于System.Net.WebRequest的类(如HttpWebRequest)时,会出现"Unable to load DLL 'rasapi32.dll'"异常,使用catch捕获的异常信息为:Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section。
这个异常导致网站程序不能发送WebRequest,也就不能调用Web服务。对于博客程序来说,就无法使用Ping、Pingback、Trackback、BlogRoll等有关功能。
出现这种异常是因为服务器端用于发送WebRequest的代理不是系统默认代理,可通过在网站程序的Web.Config文件的configuration配置节中添加以下配置解决:
 <system.net>
    <defaultProxy>
      <proxy usesystemdefault="False" />
    </defaultProxy>
  </system.net>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:,
Category:.NET编程 | 博客技术

Add comment


 

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0 Theme by Mads Kristensen
滇ICP备06001863号

我的软件

最新评论

Comment RSS

声明

      如非特别注明,本网站发布的所有文章、源代码及软件均为原创,其版权归www.tiray.net所有。如需转载或引用,请注明出处并通知作者。
      本网站建立于中华人民共和国境内,受中华人民共和国法律法规约束。请勿在本网站发表违反国家法律法规的言论。