Web 服务不接受 JSON 请求

发布于 2024-08-28 19:26:51 字数 612 浏览 3 评论 0原文

主要问题是我无法运行接受 JSON 格式请求的 Web 服务。我不断收到 500 服务器错误,指出“请求格式无效”。我的 ASP.NET AJAX 扩展已安装。我的服务器运行的是 Plesk 控制面板 8.6,这无疑是导致这些问题的原因。

此指定扩展的默认处理程序显示在 web.config 中,如下所示:

对于我的应用程序 Web 服务来处理 JSON,它需要有此参考:

      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Plesk 不允许正确处理请求。我需要知道要放入 web.config 中的正确 http 指令才能正确处理 JSON Web 服务。两天前我尝试在 Plesk 论坛上发帖,但尚未回复。

任何见解都会很棒=)

The main issue is that I cannot run a webservice that accepts requests in JSON format. I keep getting a 500 Server error stating that the "request format is invalid." My ASP.NET AJAX extensions are installed. My server is running Plesk Control Panel 8.6 which is undoubtedly causing these problems.

The default handler for this specified extension is shown in the web.config like so:

For my applications webservice to handle JSON it needs to have this reference:

      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Plesk is not allowing the request to be handled properly. I need to know the correct http directive(s) to put into the web.config to properly handle JSON webservices. I tried posting to the Plesk forum two days ago but no response yet.

Any insight would be great =)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

思念满溢 2024-09-04 19:26:51

已确认 Web 服务和 httphandler 存在错误。为了避免悲伤,请升级到>普莱斯克 9.0。

There are confirmed errors with webservices and httphandlers. To avoid grief, upgrade to > Plesk 9.0.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文