I am in the process of deploying a set of Google Charts into SharePoint 2013. I am running into this issue where it isn't loading my data. I have tested it out in just a standard application page and it works perfectly. I will show my code below:

 <script type="text/javascript">
     //approver chart
     var chartDataApprover; // globarlvariable to hold chart data
     google.load("visualization", "1", { packages: ["corechart"] });

     $(document).ready(function () {

             url: "Chart_Application_Page.aspx/GetChartDataApprover",
             data: "",
             dataType: "json",
             type: "POST",
             contentType: "application/json; chartset=utf-8",
             success: function (data) {
                 chartDataApprover = data.d;
             error: function () {
                 alert("Error loading data! Please try again.");
         }).done(function () {
             //after data is loaded

     //approver function
     function drawChartApprover() {
         var data = google.visualization.arrayToDataTable(chartDataApprover);

         //groups chart data by name
         var resultApprover = google.visualization.data.group(data, [0], [{ 'column': 1, 'aggregation': google.visualization.data.sum, 'type': 'number' }]);

         var options = {
             title: "",
             pointSize: 5
         var pieChartApprover = new google.visualization.PieChart(document.getElementById('chart_div_approver'));
         pieChartApprover.draw(resultApprover, options);

I believe my error is coming on the line where I am setting the content type. I am deploying this into SharePoint 2013 via an Application Page... with code behind in C#.

Can anyone help me out with this issue?


"Message":"Could not load file or assembly \u0027EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089\u0027 or one of its dependencies. The system cannot find the file specified.","StackTrace":"   at WebCharts.Layouts.WebCharts.Web_Chart_Page.GetChartDataApprover()","ExceptionType":"System.IO.FileNotFoundException"}
  • What is the error you are getting. You can check browser console for that. Nov 7, 2014 at 16:26
  • have you tried using a web application relative url instead of the page url? it may be that the pagemethod needs to be accessed slightly differently?
    – Mauro
    Nov 7, 2014 at 16:38
  • I just posted my error above... @AmalHashim Nov 7, 2014 at 16:41
  • What do you mean? @Mauro Nov 7, 2014 at 16:41
  • Install EntityFramework in the SharePoint farm Nov 7, 2014 at 16:42

1 Answer 1


"Message":"Could not load file or assembly \u0027EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089\u0027 or one of its dependencies. The system cannot find the file specified.",

To fix this error make sure

  1. Entity Framework is installed on the Farm
  2. Add following web configuration entries

    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        <!--Define Entity Connection String-->    
       <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
            <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
  • the way I get to my file is C: -> Program Files -> Common Files -> Microsoft Shared -> Web Server Extensions -> 15 -> Template -> Layouts. There is not a web.config file in there.... Nov 7, 2014 at 17:02
  • 1
    Post the complete URL of the page http://... Nov 7, 2014 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.