WCFHost Communication Error

WCFHost Communication Error

Old forum URL: forums.lhotka.net/forums/t/7563.aspx


mwbryan posted on Wednesday, September 02, 2009

I installed CSLA 3.6.1 with the test apps on an XP machine with IIS installed. I created the virtual directories for PTWeb, PTWcfService, and PTWebService in IIS. The PTWeb application starts fine, but when I try to log in I receive the error below. I've tried to follow the book for configuring the WCFHost, but I must be missing something. Any ideas?

Server Error in '/PTWeb' Application.
--------------------------------------------------------------------------------

No connection could be made because the target machine actively refused it 127.0.0.1:4216
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:4216

Source Error:


Line 128: {
Line 129: cf.Abort();
Line 130: throw;
Line 131: }
Line 132:


Source File: C:\Visual Studio Projects\csla\Source\cslacs\Csla\DataPortalClient\WcfProxy.cs Line: 130

Stack Trace:


[SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:4216]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetRequestStream() +5322142
System.ServiceModel.Channels.WebRequestHttpOutput.GetOutputStream() +58

[EndpointNotFoundException: Could not connect to http://localhost:4216/WcfHost/WcfPortal.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:4216. ]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +7596735
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +275
Csla.Server.Hosts.IWcfPortal.Fetch(FetchRequest request) +0
Csla.DataPortalClient.WcfProxy.Fetch(Type objectType, Object criteria, DataPortalContext context) in C:\Visual Studio Projects\csla\Source\cslacs\Csla\DataPortalClient\WcfProxy.cs:130
Csla.DataPortal.Fetch(Type objectType, Object criteria) in C:\Visual Studio Projects\csla\Source\cslacs\Csla\DataPortal.cs:262
Csla.DataPortal.Fetch(Object criteria) in C:\Visual Studio Projects\csla\Source\cslacs\Csla\DataPortal.cs:173
ProjectTracker.Library.Security.PTIdentity.GetIdentity(String username, String password) in C:\Visual Studio Projects\csla\Samples\CslaNet\vb\ProjectTrackervb\ProjectTracker.Library\Security\PTIdentity.vb:72
ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in C:\Visual Studio Projects\csla\Samples\CslaNet\vb\ProjectTrackervb\ProjectTracker.Library\Security\PTPrincipal.vb:15
PTMembershipProvider.ValidateUser(String username, String password) in C:\Visual Studio Projects\csla\Samples\CslaNet\vb\ProjectTrackervb\www\PTWeb\App_Code\PTMembershipProvider.vb:11
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

Copyright (c) Marimer LLC