从远程服务器的 DropDownList 中选择选项时,AJAX 会生成错误
我正在使用 Visual Studio 2005 [ASP.NET/C#]。
我在母版页中添加了 Script Manager
、UpdatePanel
和 Content
。此内容标记包含母版页的 contentPlaceHolder。
其中一个内容表单加载一个 Div,其中包含一个表格。该表有几个下拉菜单。从下拉菜单中选择一个选项会填充第二个下拉菜单。
我的应用程序在从下拉列表中选择选项以及单击“提交”按钮时显示错误。仅在远程服务器上显示错误,但在本地主机上运行应用程序时不显示错误。
错误如下:
已编辑
我发现以下代码产生了问题。删除此代码后,一切正常。下面给出的代码有什么问题导致上述错误:
<location allowOverride="true" inheritInChildApplications="true"> <appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
</appSettings>
</location>
I am using Visual Studio 2005 [ASP.NET/C#].
I added Script Manager
, UpdatePanel
and Content
in the master page. This Content tag encloses the contentPlaceHolder of the Master Page.
One of the content Form loads a Div with a Table enclosed in it. The Table has few DropDowns. Selecting an option from a DropDown fills the second DropDown.
My application is showing an error, while selecting an option from a DropDown and also when clicking the Submit button. It is showing error only on remote server but not when the application is run on Local Host.
The error is below:
Edited
I found that the following code was creating problems. After removing this code, everything is working. What is the problem with the below given code that cause the above mentioned error:
<location allowOverride="true" inheritInChildApplications="true"> <appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
</appSettings>
</location>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您在响应中呈现的 HTML 被某些东西损坏了。寻找适用于渲染响应的 HTTP 模块 - 也许某些基于正则表达式的 HTML 更改出现了问题。还要查找实际 aspx 页面本身中靠近 DOCTYPE 标记的拼写错误。
事实上(刚刚注意到)错误本身说明了它可能发生的原因。如果错误仍然存在,请将 ASPX 内容粘贴到某处(mybe 中 gist.github 或 pastebin )并在此处共享链接。最后在您的问题中分享您在远程服务器上使用的 HTTPModules 列表。在 IIS 配置、web.config 和远程服务器 machine.config 中查找该列表。我怀疑只有自定义手写模块会导致错误 - 因此忽略 .NET Framework httpmodules。
Looks like your HTML rendered in the response is corrupted by something. Look for HTTP Modules that work on the rendered response - maybe some regex based HTML alteration is going awry. Look also for Typos in the actual aspx page itself near the DOCTYPE tag.
In fact (just noticed) the error itself says why it may occur. If the error still persists paste the ASPX contents somewhere (mybe in gist.github or pastebin ) and share a link here. Finally share in your question the list of HTTPModules that you are using on the remote server. Look for the list in IIS config, and in your web.config and in your remote servers machine.config. I suspect only the custom handwritten modules of causing the error - so leave out the .NET framework httpmodules.