Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 23, 2011 03:00 PM by Sagar1304
Member
18 Points
26 Posts
Dec 22, 2011 03:20 PM|LINK
Hello all,
In my aspx page i am using jquery from which i am calling httphandler. in this httphandler, i am rendering chart control by below mentioned code.
HtmlTextWriter _HtmlTextWriter = new HtmlTextWriter(_StringWriter); _Chart1.RenderControl(_HtmlTextWriter); and return string in result.
but in aspx page getting error of 404 not found for image url.
Help me to solve this.!!
Thanks, Sagar Joshi
All-Star
23562 Points
4047 Posts
Dec 22, 2011 06:50 PM|LINK
Right click in the browser and copy image URL, paste it in the address bar and see what happens.
Dec 23, 2011 04:22 AM|LINK
Hi smirnov,
i have tried that. it shows url for the image of chart like below: http://localhost:3674/ChartImg.axd?i=chart_0_1.png&g=d0acb1010f0e4c15834fac39bd517731
but it shows same error "404 Not Found".
Is there aby workaround for this?
Dec 23, 2011 08:35 AM|LINK
Please check if handler is configured correctly in the web.config
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
Dec 23, 2011 09:03 AM|LINK
Thanks smirnov
below is httphandler
Dec 23, 2011 09:17 AM|LINK
Can it be because of this problem?
Dec 23, 2011 09:44 AM|LINK
Hey smirnov,
I solved this by implementing IRequiresSessionState.
and now its rendering image of chart properly.
Regards, Sagar Joshi
Dec 23, 2011 03:00 PM|LINK
i have just noted that after implementing that interface now it will not fullfill further request untill HTTPHANDLER response has received. is there any workaround to solve this? Regards, Sagar Joshi
Sagar1304
Member
18 Points
26 Posts
how to render chart control in HTTPHANDLER
Dec 22, 2011 03:20 PM|LINK
Hello all,
In my aspx page i am using jquery from which i am calling httphandler.
in this httphandler, i am rendering chart control by below mentioned code.
HtmlTextWriter _HtmlTextWriter = new HtmlTextWriter(_StringWriter);
_Chart1.RenderControl(_HtmlTextWriter);
and return string in result.
but in aspx page getting error of 404 not found for image url.
Help me to solve this.!!
Thanks,
Sagar Joshi
smirnov
All-Star
23562 Points
4047 Posts
Re: how to render chart control in HTTPHANDLER
Dec 22, 2011 06:50 PM|LINK
Right click in the browser and copy image URL, paste it in the address bar and see what happens.
Sagar1304
Member
18 Points
26 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 04:22 AM|LINK
Hi smirnov,
i have tried that.
it shows url for the image of chart like below:
http://localhost:3674/ChartImg.axd?i=chart_0_1.png&g=d0acb1010f0e4c15834fac39bd517731
but it shows same error "404 Not Found".
Is there aby workaround for this?
Thanks,
Sagar Joshi
smirnov
All-Star
23562 Points
4047 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 08:35 AM|LINK
Please check if handler is configured correctly in the web.config
Sagar1304
Member
18 Points
26 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 09:03 AM|LINK
Thanks smirnov
below is httphandler
<handlers>
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
smirnov
All-Star
23562 Points
4047 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 09:17 AM|LINK
Can it be because of this problem?
Sagar1304
Member
18 Points
26 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 09:44 AM|LINK
Hey smirnov,
I solved this by implementing IRequiresSessionState.
and now its rendering image of chart properly.
Regards,
Sagar Joshi
Sagar1304
Member
18 Points
26 Posts
Re: how to render chart control in HTTPHANDLER
Dec 23, 2011 03:00 PM|LINK
Hey smirnov,
i have just noted that after implementing that interface now it will not fullfill further request untill HTTPHANDLER response has received.
is there any workaround to solve this?
Regards,
Sagar Joshi