WCF服务器在“未经调试启动"时未启动. [英] WCF Server is not starting while in "Start Without Debugging"

查看:129
本文介绍了WCF服务器在“未经调试启动"时未启动.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我刚刚使用WCF服务器创建了4层客户端/服务器程序.在不调试"时,在表示层上遇到错误:

Hi All,

I have just created a 4-tier Client/Server program using WCF server. On the presentation tier while I am "not debugging" I am experiencing an error:

Error in LibraryBusinessDataServices. 
Object:				LibraryBusinessUseObject
Method:				Create
Exception Message:		There was no endpoint listening at http://localhost:8732/Design_Time_Addresses/Library_Application/LibraryBusinessDataService/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Inner Exception Message:		System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8732
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream().


奇怪的是,如果我处于调试模式,则一切正常.弹出一条消息,提示"WCFsrvhot服务已启动",但是当我不调试时,该消息不会出现.

有谁对我可以解决这个问题有一个想法.如果需要进一步澄清,我很乐意提供.

感谢您的宝贵时间,
robNO.


更新:
我现在可以使所有工作正常运行,但是,我不是100%清楚为什么,但是我所做的全部都使用了服务器主机,因此一切正常.如果有人可以将我链接到关于此的文章,则希望阅读它.感谢您的宝贵时间.
robNO


The weird part is if I am in debug mode everything works fine. A message pops up saying "WCFsrvhot services started" but when I am not debugging that message does not appear.

Does anyone have an idea on how i can fix this problem. If further clarification is need i am more than happy to give it.

Thanks for your time,
robNO.


UPDATE:
I got everything to work now, however, I am not 100% clear why but All i did was used a server host and everything works. If anyone can link me to an article on this would love to read it. thanks for your time.
robNO

推荐答案

查看地址为http://localhost:8732/.因此,首先检查您的"ServiceReferences.ClientConfig"文件.如果您无法在此处找到地址,请删除服务参考并重新创建.

祝你好运... :) :):)
See the address is http://localhost:8732/. So first check your "ServiceReferences.ClientConfig" file. If you are not able to find the address there, then remove your Service Reference and Recreate the same.

Best of luck... :) :) :)


这篇关于WCF服务器在“未经调试启动"时未启动.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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