c# - ExportToHttpResponse - Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack -
i'm attempting open crystal report in new window. settled on javascript open page in new window so:
clientscript.registerstartupscript(this.page.gettype(), "", "window.open('reportwindow.aspx?" + thequerystring + "','_blank');", true);
this works fine, new window opens, etc.
from new window use line generate report:
contractlevelreport.exporttohttpresponse(crystaldecisions.shared.exportformattype.portabledocformat, response, false, "contractlevelreport");
again, works... kinda. in debug generates report, catch exception listed in subject line. if f5 (continue) on through report shows. when publish web error causes hang.
i suspect new window bumping against response.end needs happen , causes hang.
i've tried following line in couple of places.
httpcontext.current.applicationinstance.completerequest();
... not seem work.
if calling using response.redirect tell end current request, javascript window.open messes up.
suggestions?
thanks!
update:
if leave out javascript portion , generate report current window error still thrown (threadabortexception), continues , shows pdf report anyway.
something 2nd window , how cr forces response.end causing problem... not sure how resolve it.
Comments
Post a Comment