.NET Framework Bookmark and Share   
 index > Chart Controls for .NET Framework > Chart Control with Authentication mode="Forms"
 

Chart Control with Authentication mode="Forms"

I am having trouble viewing a chart when the web.config file is set to use Authentication mode="Form.

In my appSettings section I have this:

<appSettings>
<add key="ChartImageHandler" value="Storage=file;Timeout=20;Url=~/Images/;"/>
</appSettings>

In my Authentication section I have this:

<authentication mode="Forms">
<forms name="PocsAuth" loginUrl="PocsLogin.aspx"></forms>
</authentication>

I have a location section in the web.config file that looks like this:

<location path="images">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

I also have another location to tell the web.configthat this page is not secured and thesection that looks like this:

This page is where my chart is:

<location path="PocsSurveyResults.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>

My chart control html was copied from the Web Samples downloaded from the Microsoft site.

<asp:Chart ID="Chart1" runat="server" Height="296px" Width="412px" ImageLocation="~/Images/ChartPic_#SEQ(300,3)"
Palette="BrightPastel" ImageType="Png" BorderDashStyle="Solid" BackSecondaryColor="White"
BackGradientStyle="TopBottom" BorderWidth="2" BackColor="#D3DFF0" BorderColor="26, 59, 105">
<Legends>
<asp:Legend IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
</asp:Legend>
</Legends>
<BorderSkin SkinStyle="Emboss"></BorderSkin>
<Series>
<asp:Series Name="Column" BorderColor="180, 26, 59, 105">
<Points>
<asp:DataPoint YValues="45" />
<asp:DataPoint YValues="34" />
<asp:DataPoint YValues="67" />
<asp:DataPoint YValues="31" />
<asp:DataPoint YValues="27" />
<asp:DataPoint YValues="87" />
<asp:DataPoint YValues="45" />
<asp:DataPoint YValues="32" />
</Points>
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent"
BackGradientStyle="TopBottom">
<Area3DStyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False"
WallWidth="0" IsClustered="False">
</Area3DStyle>
<AxisY LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisY>
<AxisX LineColor="64, 64, 64, 64">
<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
<MajorGrid LineColor="64, 64, 64, 64" />
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>

I am trying to get the chart to show up on a non Forms Authentication protected page.
The chart does not show up in the web browser because of Forms Authentication... unless I login first, then the chart shows up.

Why is it that this works in Windows Authentication mode and it does not work under Forms Authentication mode?
And how do I get it to work in a secure web site using Forms Authentication?


Developer
  • Edited byRalphCEO Wednesday, September 23, 2009 3:18 AMmore info
  •  
RalphCEO
Try changing to

<location path="~/images">

/Jan
Lajban

It does not like the ~/ in front of the images directory.

So, yes I did try it, but no it does not work.


Developer
RalphCEO

You can use google to search for other answers

Custom Search

More Threads

• Does the install touch the .Net framework?
• getting 'error creating control' in VS2008 for chart controls in page
• how to display lots of data on chart over 10 series
• stock Intraday chart on multiple day
• need to create a very simple bar chart
• tick marks show through markers
• Code-Behind File
• stacked Bar setting xvalue
• How to auto Fix XAxis
• Multiple X-Axis Values