Click here to Skip to main content
14,733,262 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
   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().

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,

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.
Updated 12-Feb-11 21:08pm
aidin Tajadod 14-Feb-11 18:22pm
What the error says is it is trying to reach the http://localhost:8732/... I think when you run your program not in debug mode, the above address is not exist. in this situation if you go to your solution properties and in multiple startup projects chage the order, it might solve your problem.

(It is just a guess, I can not tell you for sure unless I see your code)

hope this can help you.

1 solution

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... :) :) :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900