专业发布站程序提供者! 一直在模仿,目标是超越。
客服QQ:537051581(工作时间: 早9:00-晚22:00)

asp.net网站错误无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败的解决办法

来源:概念网络 作者:概念网络 更新时间:2015-10-19 18:37:37 点击数:5

架设aspx.net网站的时候遇到一个问题,无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESULT:0x8007045A)。

截图如下

无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESULT:0x8007045A)。

 

解决办法也很简单,就是在web.config里增加一个配置,如下图

无法加载 DLL rasapi32.dll 解决办法

 

web.config 配置代码

   <system.net>
    <defaultProxy>
      <proxy usesystemdefault="false" />
    </defaultProxy>
  </system.net>

 

 错误信息全文

 “/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESULT:0x8007045A)。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.DllNotFoundException: 无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESULT:0x8007045A)。

源错误:


[没有相关的源行]
 

源文件: c:\windows\microsoft.net\Framework\v2.0.50727\Temporary ASP.NET Files\root\282eef31\bd2100e8\App_Web_djsmg3y_.6.cs    行: 0

堆栈跟踪:


[DllNotFoundException: 无法加载 DLL“rasapi32.dll”: 动态链接库(DLL)初始化例程失败。 (异常来自 HRESULT:0x8007045A)。]
   System.Net.RasHelper.RasEnumConnections(RASCONN[] lprasconn, UInt32& lpcb, UInt32& lpcConnections) +0
   System.Net.RasHelper.GetCurrentConnectoid() +105
   System.Net.AutoDetector.Initialize() +151
   System.Net.AutoDetector.get_CurrentAutoDetector() +4
   System.Net.AutoWebProxyScriptEngine..ctor(WebProxy proxy, Boolean useRegistry) +54
   System.Net.WebProxy.UnsafeUpdateFromRegistry() +33
   System.Net.WebProxy..ctor(Boolean enableAutoproxy) +7
   System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section) +441
   System.Net.Configuration.DefaultProxySectionInternal.GetSection() +109

[ConfigurationErrorsException: 创建在“system.net/defaultProxy”配置节中指定的 Web 代理时出错。]
   System.Net.Configuration.DefaultProxySectionInternal.GetSection() +207
   System.Net.WebRequest.get_InternalDefaultWebProxy() +125
   System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) +184
   System.Net.HttpRequestCreator.Create(Uri Uri) +26
   System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) +216
   System.Net.WebRequest.Create(Uri requestUri) +31
   fortyps.net.Crawler.GetRedirectUrl(String url) +92
   Admin_Collect_Start.Page_Load(Object sender, EventArgs e) +1258
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   fortyps.net.AdminPage.OnLoad(EventArgs e) +746
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6741
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.admin_collect_start_aspx.ProcessRequest(HttpContext context) in c:\windows\microsoft.net\Framework\v2.0.50727\Temporary ASP.NET Files\root\282eef31\bd2100e8\App_Web_djsmg3y_.6.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

 


--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.3634; ASP.NET 版本:2.0.50727.3634

栏目说明:

关于我们 版权声明 网站地图 在线留言 官方博客 RSS订阅
©2014 Www.40Ps.Com 概念网络