【发布时间】:2010-11-12 16:56:45
【问题描述】:
我有一个启用 CLR 的 .NET 应用程序,它可以访问 Web 服务并将 xml 文件写入 Web 服务器以供 SQLServer SSIS 包消化。在开发服务器上一切正常,但生产服务器返回以下错误:
创建指定的 Web 代理时出错 在“system.net/defaultProxy”中 配置部分:在 System.Net.Configuration.DefaultProxySectionInternal.GetSection() 在 System.Net.WebRequest.get_InternalDefaultWebProxy() 在 System.Net.HttpWebRequest..ctor(Uri uri,ServicePoint 服务点)在 System.Net.HttpRequestCreator.Create(Uri 乌里)在 System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) 在 System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串 方法名,对象 [] 参数)在 MyDBProj.com.dmsintegration.secure.VehicleInventoryService.RetriveVehicleInventory(RetrieveAllRecordsRequest 请求)在 UserDefinedFunctions.LoadDMSFile(字符串 经销商 ID,字符串 dms_username,字符串 dms_password,字符串 dms_location_id)
服务器操作系统版本或 SQLServer 版本之间没有区别。我们使用的是 Windows Server 2003 R2 和 SQL Server 2005。我相信它一定是服务器本身的配置,但我找不到服务器之间的任何差异。两台服务器都没有运行软件防火墙。
完全例外:
System.Configuration.ConfigurationErrorsException: 创建指定的 Web 代理时出错 在“system.net/defaultProxy”中 配置部分。 ---> System.DllNotFoundException:无法加载 DLL 'rasapi32.dll':A 动态链接库 (DLL) 初始化例程失败。 (HRESULT 异常:0x8007045A)
在 System.Net.UnsafeNclNativeMethods.RasHelper.RasEnumConnections(RASCONN[] lprasconn, UInt32& lpcb, UInt32& lpcConnections)在 System.Net.UnsafeNclNativeMethods.RasHelper.GetCurrentConnectoid() 在 System.Net.AutoWebProxyScriptEngine.AutoDetector.Initialize() 在 System.Net.AutoWebProxyScriptEngine..ctor(WebProxy 代理,布尔值 useRegistry) 在 System.Net.WebProxy.UnsafeUpdateFromRegistry() 在 System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection 部分)在 System.Net.Configuration.DefaultProxySectionInternal.GetSection() --- 内部异常堆栈跟踪结束 --- 在 System.Net.Configuration.DefaultProxySectionInternal.GetSection() 在 System.Net.WebRequest.get_InternalDefaultWebProxy() 在 System.Net.HttpWebRequest..ctor(Uri uri,ServicePoint 服务点)在 System.Net.HttpRequestCreator.Create(Uri 乌里)在 System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) 在 System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri) 在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串 方法名,对象 [] 参数)在 MyDBProj.com.dmsintegration.secure.VehicleInventoryService.RetriveVehicleInventory(RetrieveAllRecordsRequest 请求)在 UserDefinedFunctions.LoadDMSFile(字符串 经销商 ID,字符串 dms_username,字符串 dms_password,字符串 dms_location_id)
【问题讨论】:
-
什么是启用 CLR 的 .NET 应用程序?在 .NET 1.0 beta 1 之前,我一直在使用 .NET,但我想我从未听说过。
-
这只是一个 C# 程序集,已加载到 SQL Server 中,供服务器上的函数和存储过程使用。