E
etantonio
Good morning, I've a problem, in the past I translate my site from
google or altavista with a code similar to this :
<%@ Page Language="c#" Trace="true" Debug="true" %>
<%@ import Namespace="System.Net" %>
<%@ import Namespace="System.IO" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E )
{
if (!Page.IsPostBack)
{
String sAddressTime =
"http://translate.google.com/transla...coff=1&ie=UTF-8&oe=UTF-8&prev=/language_tools";
WebRequest req = WebRequest.Create(sAddressTime);
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
StreamReader reader = new StreamReader(ReceiveStream,
Encoding.ASCII);
String respHTML = reader.ReadToEnd();
Trace.Write("respHTML",respHTML);
}
}
</script>
Now this seems no more possible and the answer is
System.Net.WebException: Connection closed: Impossibile
impossible to connect to remote server
while if I directly insert the url in a browser
http://translate.google.com/transla...coff=1&ie=UTF-8&oe=UTF-8&prev=/language_tools
I've the page correctly translated, there is a way to solve this my
problem ?? Many thanks.
Antonio
google or altavista with a code similar to this :
<%@ Page Language="c#" Trace="true" Debug="true" %>
<%@ import Namespace="System.Net" %>
<%@ import Namespace="System.IO" %>
<script runat="server">
void Page_Load(Object Src, EventArgs E )
{
if (!Page.IsPostBack)
{
String sAddressTime =
"http://translate.google.com/transla...coff=1&ie=UTF-8&oe=UTF-8&prev=/language_tools";
WebRequest req = WebRequest.Create(sAddressTime);
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
StreamReader reader = new StreamReader(ReceiveStream,
Encoding.ASCII);
String respHTML = reader.ReadToEnd();
Trace.Write("respHTML",respHTML);
}
}
</script>
Now this seems no more possible and the answer is
System.Net.WebException: Connection closed: Impossibile
impossible to connect to remote server
while if I directly insert the url in a browser
http://translate.google.com/transla...coff=1&ie=UTF-8&oe=UTF-8&prev=/language_tools
I've the page correctly translated, there is a way to solve this my
problem ?? Many thanks.
Antonio