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 服务


- 带问号的 nvarchar 列结果 2022-01-01
- 使用 rss + c# 2022-01-01
- 在 C# 中异步处理项目队列 2022-01-01
- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- 在 LINQ to SQL 中使用 contains() 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01