当前位置: 代码迷 >> ASP.NET >> QQ登录技术,问上为什么'rasapi32.dll': 动态链接库(DLL)初始化例程失败
  详细解决方案

QQ登录技术,问上为什么'rasapi32.dll': 动态链接库(DLL)初始化例程失败

热度:10249   发布时间:2013-02-25 00:00:00.0
QQ登录技术,问下为什么'rasapi32.dll': 动态链接库(DLL)初始化例程失败
Server Error in '/' Application.
Unable to load DLL 'rasapi32.dll': 动态链接库(DLL)初始化例程失败。 (Exception from HRESULT: 0x8007045A)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DllNotFoundException: Unable to load DLL 'rasapi32.dll': 动态链接库(DLL)初始化例程失败。 (Exception from HRESULT: 0x8007045A)

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
  <system.web>
  <compilation debug="true"/>
  </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[DllNotFoundException: Unable to load DLL 'rasapi32.dll': 动态链接库(DLL)初始化例程失败。 (Exception from HRESULT: 0x8007045A)]
  System.Net.RasHelper.RasEnumConnections(RASCONN[] lprasconn, UInt32& lpcb, UInt32& lpcConnections) +0
  System.Net.RasHelper.GetCurrentConnectoid() +136
  System.Net.AutoDetector.Initialize() +132
  System.Net.AutoDetector.get_CurrentAutoDetector() +20
  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) +478
  System.Net.Configuration.DefaultProxySectionInternal.GetSection() +113

[ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.]
  System.Net.Configuration.DefaultProxySectionInternal.GetSection() +208
  System.Net.WebRequest.get_InternalDefaultWebProxy() +133
  System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) +173
  System.Net.HttpRequestCreator.Create(Uri Uri) +26
  System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) +225
  System.Net.WebRequest.Create(String requestUriString) +44
  YanNanFei.QQOAuth.RequestUrl(String url) in H:\个人项目\雁南飞\YanNanFei_0723\YanNanFei\App_Code\QQOAuth.cs:117
  YanNanFei.QQOAuth.GetTempToken() in H:\个人项目\雁南飞\YanNanFei_0723\YanNanFei\App_Code\QQOAuth.cs:44
  YanNanFei.Oauth.QQlogin.Page_Load(Object sender, EventArgs e) in H:\个人项目\雁南飞\YanNanFei_0723\YanNanFei\Oauth\QQlogin.aspx.cs:14
  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) +91
  System.Web.UI.Control.LoadRecursive() +74
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8387
  System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253