IIS Express 拒绝 ADO.Net 数据服务中的 PUT 请求
我有一个使用 ado.net 数据服务的项目。该项目最初是在 VS2005 和 IIS6 中开发的,但我现在将其移植到 IIS7 标准。我在尝试更新现有记录时遇到了障碍,放置操作(对服务)失败并提示以下浏览器警报:
URI“http://localhost:6188/services/Datatracker.svc/provider”对于 PUT 操作无效。 URI 必须指向 PUT 操作的单个资源。
我想这是因为 URI 被视为文件夹,并且我知道这可以通过配置来纠正,但我在查找特定设置时遇到了困难
。如有任何帮助,我们将不胜感激。
I have a project that uses ado.net dataservices. This project was originally developed in VS2005 and IIS6 but I am now porting it to IIS7 standards. I've run into a snag when trying to update existing records, the put operation (to the service) fails and prompts the following browser alert:
The URI 'http://localhost:6188/services/Datatracker.svc/provider' is not valid for PUT operation. The URI must point to a single resource for PUT opeations.
I imagine this is because the URI is being treated as a folder, and I know that this can be corrected through configuration but I'm having trouble finding the specific settings
Any assistance would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,事实证明,这是放置和删除请求的无效语法:
有效的 odata 语法是:(OLKM 表示唯一标识记录的键字段的值)
旧的 asp.net + iis6 允许您绕过此要求,但iis7 & .net 3.5+ 要求您使用正确的语法。
So as it turns out this is invalid syntax for put and delete requests:
Valid odata syntax is: (OLKM represents the calue of the keyfield that uniquely identifies the record)
Old asp.net + iis6 allowed you to cheat your way around this requirement, but iis7 & .net 3.5+ requires you to use the correct syntax.