asp.net,动态链接库(DLL)初始化例程失败(rasapi32.dll),怎么回事?
两个网站,全部用 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