我有一个支持CLR的.NET应用程序访问Web服务并将xml文件写入Web服务器以供SQLServer SSIS包消化.在开发服务器上一切正常,但生产服务器返回以下错误:
创建在"system.net/defaultProxy"配置部分中指定的Web代理时出错:在System.Net.HttpWebRequest..ctor处的System.Net.WebRequest.get_InternalDefaultWebProxy()处的System.Net.Configuration.DefaultProxySectionInternal.GetSection()处(Uri uri,ServicePoint servicePoint)位于System.Net.Ser.服务上的System.Net.HttpRequestCreator.Create(Uri Uri)System.Web.WebRequest.Create(Uri requestUri,Boolean useUriBase),System.Net服务.ProtWeb.WebClientProtocol.GetWebRequest(Uri uri)在System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object [在UserDefinedFunctions.LoadDMSFile的MyDBProj.com.dmsintegration.secure.VehicleInventoryService.RetriveVehicleInventory(RetrieveAllRecordsRequest请求)中的参数)(String dealer_id,String dms_username,String dms_password,String dms_location_id)
服务器操作系统版本或SQLServer版本之间没有区别.我们正在使用Windows Server 2003 R2和SQL Server 2005.我认为它必须是服务器本身的配置,但我找不到服务器之间的任何差异.两台服务器都没有运行软件防火墙.
完全例外:
System.Configuration.ConfigurationErrorsException:创建"system.net/defaultProxy"配置部分中指定的Web代理时出错.---> System.DllNotFoundException:无法加载DLL'rasapi32.dll':动态链接库(DLL)初始化例程失败.(来自HRESULT:0x8007045A的例外)
System.Net.UnsafeNclNativeMethods.RasHelper.RasEnumConnections(RASCONN [] lprasconn,UInt32&lpcb,UInt32&lpcConnections)在System.Net.UnsafeNclNativeMethods.RasHelper.GetCurrentConnectoid()处于System.Net.AutoWebProxyScriptEngine.AutoDetector.在System.Net.Configuration的System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection部分)的System.Net.WebProxy.UnsafeUpdateFromRegistry()处的System.Net.AutoWebProxyScriptEngine..ctor(WebProxy代理,布尔useRegistry)初始化() .DefaultProxySectionInternal.GetSection()---内部异常堆栈跟踪的结束---位于System.Net.HttpWebRequest..ctor处System.Net.WebRequest.get_InternalDefaultWebProxy()的System.Net.Configuration.DefaultProxySectionInternal.GetSection()处( System.Web.Services.Protocols.WebClientProtocol.GetWe上System.Net.WebRequest.Create(Uri requestUri,Boolean useUriBase)的System.Net.HttpRequestCreator.Create(Uri Uri)上的Uri uri,ServicePoint servicePoint)bRequest(Uri uri)at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke( UserDefinedFunctions.LoadDMSFile上的MyDBProj.com.dmsintegration.secure.VehicleInventoryService.RetriveVehicleInventory(RetrieveAllRecordsRequest请求)中的String methodName,Object [] parameters)(String dealer_id,String dms_username,String dms_password,String dms_location_id)