I'm creating an application with WebBrowser component in C # but when I run the following code it returns me a 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 does not run my application in Adobe FLEX.