iis - ASP.NET MVC3 Chart Web helper doesnt work when hosted on IIS7 -
i'm using new chart helper method available in system.web.helpers assembly shown here
it works fine when run app in visual studio's inbuilt server. when publish website virtual directory in iis on local machine, image doesnt show , in place "red cross" mark shows up.
i'm not using relative paths , static content available on server since can see other images displayed in app when published.
here's view
{img src="/home/getrainfallchart" alt="chart" /}
this action
public actionresult getrainfallchart() { var key = new chart(width: 600, height: 400).addseries( charttype: "area", legend: "rainfall", xvalue: new[] { "jan", "feb", "mar", "apr", "may" }, yvalues: new[] { "20", "20", "40", "10", "10" }) .write(); return null; }
do need copy dlls when publishing?
found solution
need work on iis when hosted on virtual directory
<img src = <%= url.content("~/home/getrainfallchart") %>" alt="chart" />
Comments
Post a Comment