Hi misters,
I have an application web ASP.NET 2.0 using ASP.NET AJAX and Ajax Control
Toolkit. Too, we have Enterprise Library (Exception Handling, Logging)
We need handles errors of AJAX,
Any code sample for use Enterprise Library (Exception Handling) and ASP.NET
AJAX ?
void ScriptManager1_ AsyncPostBackEr ror(object sender,
AsyncPostBackEr rorEventArgs e)
{
string retError = "Ooops...er ror ocurrido: " +
"\nsender: " +
((System.Web.UI .ScriptManager) (sender)).Async PostBackSourceE lementID +
"\nExceptio n Name: " + e.Exception.Get Type().FullName +
"\nMessage: " + e.Exception.Mes sage;
ScriptManager.G etCurrent(this. Page).AsyncPost BackErrorMessag e =
retError;
bool rethrow = ExceptionPolicy .HandleExceptio n(exception,
TINSA.Servicios .Base.Excepcion es.Politicas.Po liticasUtil.NOM BRE_POLITICA_PR ESENTACION_WEB) ;
if (rethrow)
{
//throw exception;
}
}
I define my Policy like this:
Exception IExceptionHandl er.HandleExcept ion(Exception exception, Guid
handlingInstanc eId)
{
HttpContext contexto = HttpContext.Cur rent;
if (contexto != null)
{
Page page = contexto.Handle r as Page;
if (page != null)
{
// do something
RegisterStartup Script(page, "jsPoliticaExce pcionIU",
"alert('Err or Politica IU: " + exception.Messa ge.Replace("'", " ") + "');");
}
}
return exception;
}
Is it possible register script in my policy and the
AsyncPostBackEr rorMessage message not appears (AJAX Client not show the
default alert with the AsyncPostBackEr rorMessage value, like I cancel show
that message) ?.
Any help will be appreciated, and I'll be very grateful. Thanks in advance.
Greetings, regards.
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft