我的页面方法返回来自服务器端的整个页面。在我的本地环境中,它工作正常但是当我将它部署到azure时,我遇到了这个问题。
我的代码是:
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);
}
在配置中我还没有添加
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
当我将它添加到我的配置中然后在本地也项目没有工作得到像
这样的错误&#34;由于发生内部服务器错误,无法显示页面。&#34;
答案 0 :(得分:0)
我在web.config中找到了一些配置丢失的解决方案 我添加了
<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>
现在工作正常