问题描述
限时送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:关键词]
发布评论