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

xu_larry 2012-08-14 11:36:58
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
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.oauth_qqlogin_aspx.ProcessRequest(HttpContext context) in c:\windows\microsoft.net\Framework\v4.0.30319\Temporary ASP.NET Files\root\dd65a775\9890d957\App_Web_j1c3mqam.1.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

我点击登录按钮时候连接到/oauth/QQlogin.aspx这样一个页面,这个页面里面代码是
string QQreturnstr = QQOAuth.GetTempToken();
if (QQreturnstr.IndexOf("error_code") < 0)
{
//获得临时令牌成功
string[] temps = QQreturnstr.Split('&', '=');
Session["oauth_token_secret"] = temps[3];
//下面引导用户登录,将用户引导到QQ登录界面
Response.Redirect("http://openapi.qzone.qq.com/oauth/qzoneoauth_authorize?oauth_consumer_key=" + QQOAuth.appid + "&oauth_token=" + temps[1] + "&oauth_callback=http://webtest.viecn.com/Oauth/GetRightQQTonken.aspx");
}
但是现在的问题是,点击登录按钮连接这个页面就直接报错!
...全文
347 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2012-08-14
  • 打赏
  • 举报
回复
asp.net是匿名帐号运行的,一般是没有权限读取iis文件夹之外的文件的
basshunters 2012-08-14
  • 打赏
  • 举报
回复
好像是权限问题
孟子E章 2012-08-14
  • 打赏
  • 举报
回复
应用程序池-标识-选本地系统或者输入管理员身份的账户
xu_larry 2012-08-14
  • 打赏
  • 举报
回复
那怎么解决这个问题啊?

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧