Consume OData Service from Visual Studio 2017(从 Visual Studio 2017 使用 OData 服务)
问题描述
我在使用 Dynamics Nav OData 时遇到问题.我正在使用 Visual Studio Community 2017(版本 15.9.0),并且我已经安装了扩展 OData 连接服务(官方 Microsoft 扩展)
这是我的 Odata 结构:
<块引用>到目前为止,一切正常.
问题是当我去 Visual Studio 并尝试添加新的连接服务时,它会引发下一个错误
图片文字:
<块引用>连接服务无法访问
对我来说效果很好.
I've a issue consuming Dynamics Nav OData. I'm using Visual Studio Community 2017 (version 15.9.0), and I've installed the extension OData Connected Service (Official Microsoft Extension)1.
This is my Odata structure:
http://myWeb:8145/DynamicsNav90_Desa/OData
I've verified and the odata is returning 2 values correctly at opera browser.
So far, it's working fine.
The problem is when I go to the visual studio and I try to add a new connected service, It throws the next error 3:
Image text:
Connected Services Cannot access http://myWeb:8145/DynamicsNav90_Desa/OData/$metadata
I've checked the firewall and the port information and they are totally open to connect.
I had the same issue (I'm also working with Dynamics Nav ;) )
The problem is that OData Connected Service doesn't support authorization.
You need to save metadata file locally and point it when adding OData Service Reference.
- Open http://myWeb:8145/DynamicsNav90_Desa/OData/$metadata in the browser and save it on disk
- Use path to this file during adding service reference in Visual Studio:
For me it works perfectly.
这篇关于从 Visual Studio 2017 使用 OData 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从 Visual Studio 2017 使用 OData 服务


基础教程推荐
- SSE 浮点算术是否可重现? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- MS Visual Studio .NET 的替代品 2022-01-01