Пытаюсь сохранить результат выполнения php-скрипта. Если делаю vbs-скриптом, все получается:
Set web = CreateObject("System.Net.WebClient")
web.DownloadFile "
http://address/getprice.php", "D:\mysite.txt"
аналогичным образом пытаюсь сделать через v7clr:
Web=СоздатьОбъект("!System.Net.WebClient, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
Web.DownloadFile("http://address/getprice.php","D:\mysite.txt");
шибко ругается:
Web.DownloadFile("
http://address/getprice.php","D:\mysite.txt");
{D:\DATABASE\PSA\EXTFORMS\ПОЛУЧИТЬУСЛУГИТЕРМИНАЛА.ERT(180)}: System.Net.WebException: An exception occurred during a WebClient request. ---> System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section. ---> System.PlatformNotSupportedException: This operation is only supported on Windows 2000 SP3 or later operating systems.
at System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType sidType, SecurityIdentifier domainSid)
at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)
at System.Net.NetworkingPerfCounters.Initialize()
at System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection section)
at System.Net.Configuration.SettingsSectionInternal.get_Section()
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.NetworkAddressChangePolled..ctor()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.Initialize()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.get_CurrentAutoDetector()
at System.Net.AutoWebProxyScriptEngine..ctor(WebProxy proxy, Boolean useRegistry)
at System.Net.WebProxy.UnsafeUpdateFromRegistry()
at System.Net.WebProxy..ctor(Boolean enableAutoproxy)
at System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section)
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
--- End of inner exception stack trace ---
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
at System.Net.WebRequest.get_InternalDefaultWebProxy()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Net.WebClient.GetWebRequest(Uri address)
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
--- End of inner exception stack trace ---
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at System.Net.WebClient.DownloadFile(String address, String fileName)
at (Object& , Object )
at CCLRWrapper.CallAsFunc(CCLRWrapper* , Int32 , CValue* , CValue** )
система при этом Windows 2003SP2. Что посоветуете?