Имя: Пароль:
IT
Админ
Ошибка подключения к сайту ☑
0 AndreyNN
 
25.06.12
✎
18:38
Обработка подключается к сайту:
WinHttp=Новый COMОбъект("WinHttp.WinHttpRequest.5.1");
WinHttp.Option(2,"Windows-1251");                  
WinHttp.Open("POST","http://www.bank.gov.ua/control/uk/curmetal/detail/currency?period=daily",0);
WinHttp.SetProxy(2,"192.168.1.1:3128");    
WinHttp.SetRequestHeader("Accept-Language", "ru");
WinHttp.SetRequestHeader("Accept-Charset","Windows-1251");
WinHttp.setRequestHeader("Content-Language", "ru");
WinHttp.setRequestHeader("Content-Charset", "Windows-1251");
WinHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=Windows-1251");
WinHttp.Send("");
ПолученыйТекст = WinHttp.ResponseText();

При выполнении переменная ПолученыйТекст содержит текст:"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: Cache Access Denied</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD>
<BODY>
<H1>ERROR</H1>
<H2>Cache Access Denied</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://www.bank.gov.ua/control/uk/curmetal/detail/currency?">http://www.bank.gov.ua/control/uk/curmetal/detail/currency?</A>;
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Cache Access Denied.
</STRONG>
</UL>
</P>

<P>Sorry, you are not currently allowed to request:
<PRE>    http://www.bank.gov.ua/control/uk/curmetal/detail/currency?</PRE>;
from this cache until you have authenticated yourself.
</P>

<P>
You need to use Netscape version 2.0 or greater, or Microsoft Internet
Explorer 3.0, or an HTTP/1.1 compliant browser for this to work.  Please
contact the <A HREF="mailto:webmaster">cache administrator</a> if you have
difficulties authenticating yourself or
<A HREF="http://kyivgate/cgi-bin/chpasswd.cgi">change</a> your default password.
</P>

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Mon, 25 Jun 2012 13:38:26 GMT by kyivgate (squid/2.5.STABLE14)
</ADDRESS>
</BODY></HTML>"

Обработка выполняется на WS 2008 64bit,IE8

Вопрос почему вылетает такая ошибка?
1 AndreyNN
 
25.06.12
✎
18:56
Добавил в разрешенные узлы IE и помогло