惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
有赞技术团队
有赞技术团队
宝玉的分享
宝玉的分享
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
大猫的无限游戏
大猫的无限游戏
博客园 - 司徒正美
D
Docker
T
The Blog of Author Tim Ferriss
罗磊的独立博客
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
J
Java Code Geeks
Jina AI
Jina AI
博客园 - 【当耐特】
C
Check Point Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog

博客园 - See Me Fly

[MVC] Code First中Migration的问题 [MVC]开篇 搭建小型邮件服务器 IIS7 IIS8上面运行 ASP 画圆滑的曲线连接地图上面的点 [IIS] 不能加载类型System.ServiceModel.Activation.HttpModule [DICOM] Download ClearCanvas Source Code [DICOM] 开篇 研究SplendidCRM UnauthorizedAccessException trying to delete a file [转]C#WinForm - 立即更新静态文本Label Crystal Report 2011连接SQL Server 2008失败 Xcode: 给项目添加framework DC中用户的同步问题 用VNC连接Mac OS Xcode访问SVN服务器 Window 7访问共享目录问题 JIRA配置SSL Failed to install MSXML6 when installing SQL Server 2005 - See Me Fly
Visual Studio中添加Service异常
See Me Fly · 2013-03-27 · via 博客园 - See Me Fly

异常现象:

在Visual Studion下Service References中尝试Add Service,但是自动生成的Reference.cs是空的。App.config(Web.config)文件不会被更新,没有自动添加Service的配置信息。

解决办法:

大部分原因是因为WCF Service中有方法是用同类型的参数。不要勾选“重用引用程序集中的类型”)

参考地址:http://stackoverflow.com/questions/1408509/sometimes-adding-a-wcf-service-reference-generates-an-empty-reference-cs

Generally I find that it's a T4 codegen issue and most of the time it's because I've got a type name conflict it couldn't resolve.

If you right-click on your service reference and click configure and uncheck "Reuse Types in Referenced Assemblies" it'll likely resolve the issue.

If you were using some aspect of this feature, you might need to make sure your names are cleaned up.

另外:

可以用WCFTestClient来测试WCF Service是否是正常工作的。(在VS工具中打开Open Visual Studio Command Prompt,输入”WCFTestClient“)