---
title: "Page method is returning content of whole page"  
description: "Page method is returning content of whole page"  
author: "Anonymous User"  
published: 2015-01-16  
updated: 2015-01-16  
canonical: https://www.mindstick.com/forum/12866/page-method-is-returning-content-of-whole-page  
category: "asp.net"  
tags: [".net", "javascript", "azure mobile services"]  
reading_time: 1 minute  

---

# Page method is returning content of whole page

My page method is [returning](https://www.mindstick.com/news/2477/returning-ceo-bob-iger-dismisses-the-disney-apple-sale-as-pure-speculation) whole page insted of result from the [server side](https://www.mindstick.com/forum/318/how-to-call-javascript-fuction-in-server-side). In my local [environment](https://yourviews.mindstick.com/view/308/need-to-create-a-supportive-work-environment-for-women) it is [working fine](https://answers.mindstick.com/qa/95550/why-is-the-safari-browser-not-working-fine) but when I deploy it to azure I [am getting](https://www.mindstick.com/forum/34179/i-am-getting-error-while-assigning-the-data-to-the-array-list) this problem.

**My code is:**

```
function LoadLogsOnSucceeded(result) {    document.getElementById('divHistoryHeader').innerHTML = result.Header;    document.getElementById("divHistoryList").innerHTML = result.List;} function LoadLogs() {    var searchTxt = $("#txtLogsearch").val();    var maxRecords = $('select[id=drplogSearchMaxRecords]').val();     PageMethods.LoadLogs(searchTxt, maxRecords, LoadLogsOnSucceeded, OnFailed);}
```

In config I have not added

**<httpModules>**

**<add** name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, [Version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version)=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"**/>**

**</httpModules>**

when I add that into my config then in local also project is not working [getting error](https://www.mindstick.com/forum/159638/getting-error-microsoft-office-interop-outlook-doesn-t-work) like

"The page [cannot be displayed](https://answers.mindstick.com/qa/95308/how-can-i-open-a-telegram-channel-that-cannot-be-displayed) because an [internal server error](https://www.mindstick.com/forum/159408/an-api-request-returns-a-500-internal-server-error-how-to-fix-this-error) has occurred."

## Replies

### Reply by Elena Glibart

I got the solutions some configurations were missing in web.config I added

```
<httpModules>  <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></httpModules>    <runtime>    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">      <dependentAssembly>        <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />      </dependentAssembly>      <dependentAssembly>        <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" />        <bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.2.0.0" />      </dependentAssembly>      <dependentAssembly>        <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />      </dependentAssembly>    </assemblyBinding>  </runtime>
```

and now it is working fine


---

Original Source: https://www.mindstick.com/forum/12866/page-method-is-returning-content-of-whole-page

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
