创建网站以托管 WCF 服务时,编辑 wcf 配置会显示“未找到服务"

编程入门 行业动态 更新时间:2024-10-25 16:28:35
本文介绍了创建网站以托管 WCF 服务时,编辑 wcf 配置会显示“未找到服务"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我是 WCF 的新手,有一个我认为应该很简单的问题.我创建了一个包含 WCF 服务库和托管服务的网站的解决方案.在网站中,我引用了服务库项目,因此 service.dll 位于我网站的/bin 中.我编辑了网站中的 .svc 文件以使用引用项目的服务,但是当我右键单击 web.config 并在服务下选择编辑 WCF 配置"时,它显示未定义服务".

I am new to WCF and have what I think should be a simple question. I created a solution that contains a WCF service library, and a website to host the service. In the website I reference the service library proj, so the service.dll is in my website's /bin. I edited the .svc file in the website to use the referenced project's service, but when I right click on the web.config and choose "Edit WCF Configuration" under services it says "No services defined".

我正在学习本教程,http://www.youtube/watch?v=SVPXLF-g4Ws&功能=相关当他执行编辑 WCF 配置"步骤时,会列出引用的服务.

I am following this tutorial, http://www.youtube/watch?v=SVPXLF-g4Ws&feature=related and when he does the "Edit WCF Configuration" step, the referenced service is listed.

他用的是vs2008,我用的是vs2010.我错过了什么吗?我希望我提供的信息足以得到一些答案.

He is using vs2008, I am using vs2010. Am I missing something? I am hope I have provided is enough info to get some answers.

谢谢

推荐答案

我遇到了同样的问题,但我在 VS2008 中重新创建了我的 WCF 服务并且它工作正常.我很想知道为什么 VS2010 中的配置无法识别该服务.

I am having this same exact issue, but I recreated my WCF service in VS2008 and it worked. I would love to know why the configuration doesn't recognize the service in VS2010.

更新:我编辑了 web.config 文件,将 System.ServiceModel 部分替换为 WCF 库 app.config 中的部分.

Update: I edited the web.config file replacing the System.ServiceModel section with the one from the WCF Library app.config.

这篇关于创建网站以托管 WCF 服务时,编辑 wcf 配置会显示“未找到服务"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-26 18:58:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1141060.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:未找到   编辑   网站   quot   WCF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!