1
I am creating an application with Webbrowser component in C# but when running the following code it returns me Javascript error and does not run my other application that was developed in Adobe Flex:
private void chamaPagina(string tipo)
{
string url = "";
string pac = "http://localhost/accelerated_pac_base.pac";
if (tipo == "frete")
{
url = "http://localhost/frete.html#";
}
else
{
url = "http://localhost/posto.html#";
}
//Método externo para ler arquivo pac e configurar proxy
WebRequest requestNavegador = (HttpWebRequest)WebRequest.Create(url);
string dadosProxy = Proxy.GetProxyForUrlUsingPac(url, pac);
if (dadosProxy != null)
{
requestNavegador.Proxy = new WebProxy(dadosProxy);
}
HttpWebResponse response = (HttpWebResponse)requestNavegador.GetResponse();
Stream receiveStream = response.GetResponseStream();
webBrowser1.DocumentStream = receiveStream;
}
But if I add webBrowser1.ScriptErrorsSuppressed = true;
it did not display the error messages and still not running my application in Adobe FLEX.
Running the program brings up some error message on the console?
– Oralista de Sistemas
Does not return any error, appears only the script error message, if I use
webBrowser1.Navigate('http://localhost/frete.html#')
the problem does not occur, but I need it to be applied proxy through the file . Pac– Cristiano Ávila Salomão
"No error returns me, only the script error message appears" - which is the exact text of the message?
– Oralista de Sistemas
http://i.stack.Imgur.com/kUYfM.png
– Cristiano Ávila Salomão