asp.net,动态链接库(DLL)初始化例程失败(rasapi32.dll),怎么回事?

xiaozhimin1978 2007-12-10 02:11:28
两个网站,全部用 asp.net 开发,目前暂时运行在同一台服务器上。其中一个网站上有一个 WebService,在另一个网站上调用它。在我做开发的机器上运行是正常的,但是发布到服务器上时WebService的调用者网站出现错误,使我无从下手。经测试把调用 WebService的代码注释掉时不会出错,错误信息如下:



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:


[No relevant source lines]


Source File: c:\windows\microsoft.net\Framework\v2.0.50727\Temporary ASP.NET Files\root\f5e6be20\8890d878\App_Web_cygrcyqf.2.cs Line: 0

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() +105
System.Net.AutoDetector.Initialize() +143
System.Net.AutoDetector.get_CurrentAutoDetector() +4
System.Net.AutoWebProxyScriptEngine..ctor(WebProxy proxy, Boolean useRegistry) +53
System.Net.WebProxy.UnsafeUpdateFromRegistry() +31
System.Net.WebProxy..ctor(Boolean enableAutoproxy) +7
System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section) +860
System.Net.Configuration.DefaultProxySectionInternal.GetSection() +123

[ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.]
System.Net.Configuration.DefaultProxySectionInternal.GetSection() +225
System.Net.WebRequest.get_InternalDefaultWebProxy() +74
System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) +203
System.Net.HttpRequestCreator.Create(Uri Uri) +26
System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) +373
System.Net.WebRequest.Create(Uri requestUri) +28
System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) +30
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) +12
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri) +4
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +52
localhost.CityList.PublishForPhotoShop() +31
Manage_SysInfo_CityInfo_CityList.btnPublishCityList_Click(Object sender, EventArgs e) +37
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6931
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.sysinfo_cityinfo_citylist_aspx.ProcessRequest(HttpContext context) in c:\windows\microsoft.net\Framework\v2.0.50727\Temporary ASP.NET Files\root\f5e6be20\8890d878\App_Web_cygrcyqf.2.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
...全文
882 15 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaozhimin1978 2007-12-12
  • 打赏
  • 举报
回复
up
xiaozhimin1978 2007-12-12
  • 打赏
  • 举报
回复
再次 up
xiaozhimin1978 2007-12-11
  • 打赏
  • 举报
回复
up up
xiaozhimin1978 2007-12-11
  • 打赏
  • 举报
回复
两个网站的 asp.net 版本都是 2.0.50727

两个网站池一直用的是两个不同的应用程序池

我写了 WinForm 应用程序调用这个 WebService,是正常的
qawszx 2007-12-11
  • 打赏
  • 举报
回复
那就是调用WebService的事
nanjg 2007-12-11
  • 打赏
  • 举报
回复
若是IIS6.0把 2个网站设置成不通的应用程序池 看看
nanjg 2007-12-11
  • 打赏
  • 举报
回复
请问是 否2个项目的framework版本不一样?是否是IIS6.0 ?
xiaozhimin1978 2007-12-11
  • 打赏
  • 举报
回复
自己 up 一下
xiaozhimin1978 2007-12-11
  • 打赏
  • 举报
回复
up
up
xiaozhimin1978 2007-12-10
  • 打赏
  • 举报
回复
看看那台服务器的 internet连接 设的对不对
=========================================
看哪些设置?



DllNotFoundException 是你的rasapi32.dll没找到,看看是不是这个DLL在你服务器上么?
============================================================================
确定一定以及肯定,文件在那里的,位置在 C:\windows\system32 下
haomas 2007-12-10
  • 打赏
  • 举报
回复
DllNotFoundException 是你的rasapi32.dll没找到,看看是不是这个DLL在你服务器上么?
whycom 2007-12-10
  • 打赏
  • 举报
回复
看看那台服务器的 internet连接 设的对不对
xiaozhimin1978 2007-12-10
  • 打赏
  • 举报
回复
两台机器都加载rasapi32.dll试试

=======================================================
怎么加载?
我都不知道我的程序里用到了这个东东,无从下手
小小尘土 2007-12-10
  • 打赏
  • 举报
回复
两台机器都加载rasapi32.dll试试
xiaozhimin1978 2007-12-10
  • 打赏
  • 举报
回复
自己 up 一下

62,242

社区成员

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

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

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

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