System.Threading.Le thread a été abandonné.
Bonjour,
J'ai quelques soucis avec mon application.
Je me sers de GIOS WORD pour générer depuis un site web des documents Word. Ceci marche très bien, mais à chaque fois j'ai cette erreur :
"System.Threading.ThreadAbortException: Le thread a été abandonné.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()"
Qui me ramène à ces lignes de codes :
Code:
1 2 3 4 5 6 7 8 9
| public void envoiWord()
{
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.AppendHeader("Content-disposition",
"attachment;filename=monDoc.doc");
HttpContext.Current.Response.ContentType="application/msword";
this.getDocument().SaveToStream(HttpContext.Current.Response.OutputStream);
HttpContext.Current.Response.End();
} |
Si quelqun peut m'éclairer ...
merci d'avance.