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