Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp.net Chart not getting displaying data when run on server

Status
Not open for further replies.

ecowatch

Programmer
Mar 30, 2013
2
ZA
I have a website that is written in Visual Web Developer 2010 Express.
One aspx page has a Chart control that accesses a MySQL database on my server Windows Server 2008 R2, IIS 7.
When run on the development machine (my laptop) the Chart display the data correctly.
However, when the website is copied to my server, the chart does not display the data.

My code to load the data:

'GET RECORDS OF PREVIOUS MONTH
Do Until MyDayCount = MyDayEnd
Dim Sql As String = "SELECT SUM(DiffWatt) FROM consumptrans WHERE Day='" & MyDayCount & "' AND Month='" & MyPreviousMonth & "' AND Year='" & MyPrevYear & "'AND ClientID='" & UserName & "'"
cmd = New MySqlClient.MySqlCommand(Sql, con)
reader = cmd.ExecuteReader()
While reader.Read()
MyWatts = reader.GetString(0)
If MyWatts.ToString IsNot Nothing Then
MyWatts = Val(MyWatts)
MyWatts = (MyWatts / 1000)
ChartMonth.Series(1).Points.AddXY(MyDayCount.ToString, MyWatts.ToString)
End If
End While
reader.Close()
MyDayCount = MyDayCount + 1
Loop

Can anyone possibly point me in the right direction?
I do not know if there are server settings that are required on my server.
 

If the System.Web.DataVisualization.dll is not loaded on the web server, you'll have to set the Copy Local property to "True" to publish it along with the other dlls of your project.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Many thanks.
How do I set the Copy Local to "True" in Visual Web Developer?
I can do this in VS2010, but it is not the same as in VWD 2010.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top