如何在WCF中修复AddressAlreadyInUse异常? [英] How can I fix the AddressAlreadyInUse Exception in WCF ?

查看:127
本文介绍了如何在WCF中修复AddressAlreadyInUse异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自托管的WCF项目。我的服务是在一个单独的.cs文件中的主机项目下定义的。我构建主机,它正确构建并成功运行。但是当我包括客户端与主机连接时。它也成功构建..但是当我开始调试输出时显示以下消息AddressAlreadyInUse异常。



HTTP无法注册URL http:// +:8733 / HelloIndigoService /。另一个应用程序已经使用HTTP.SYS注册了这个URL;



所以我更改了端口号,但它也显示了相同的结果。我检查了进程列表任务管理器。由于visual studio只运行一个vshost.exe文件,我的项目处于运行模式。如果我关闭解决方案,它将从任务管理器中消失。



我现在该怎么办?

I have a WCF project which is self hosted. My service is defined under host project in a separate .cs file. I build the host, it built correctly and ran successfully. But when I included client to connect with the host. it also built successfully.. But when I start debugging the output shows the following message with "AddressAlreadyInUse" exception.

"HTTP could not register URL http://+:8733/HelloIndigoService/. Another application has already registered this URL with HTTP.SYS";

So I changed the port number but it also showed the same result. I checked the list of processes from the task manager. Only a vshost.exe file in running because of visual studio is holding my project in running mode. If I close the solution it vanishes from the task manager.

What should I do now?

推荐答案

对于之前的错误链接感到抱歉...

你能试试吗?



http://blogs.msdn.com/b/keithmg/archive/2009/08/10/http-could- not-register-url-http-another-application-has-already-registered-this-url-with-http-sys.aspx [ ^ ]
sorry about wrong link previously...
Can you try this?

http://blogs.msdn.com/b/keithmg/archive/2009/08/10/http-could-not-register-url-http-another-application-has-already-registered-this-url-with-http-sys.aspx[^]


取消选中开始选项在同一解决方案中调试另一个项目时的WCF服务主机...

希望它能解决您的问题
Uncheck the option "Start WCF Service Host when debugging another project in the same solution" ...
Hope it solves your problem


这篇关于如何在WCF中修复AddressAlreadyInUse异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆