.NET Framework Bookmark and Share   
 index > .NET StockTrader Sample Application > port configuration error
 

port configuration error

When I try to log in from the configweb page, the connection tries to open the page http://localhost/configweb/default.aspx although the correct URL is http://localhost:8080/configweb/default.aspx (missing port number 8080) Error Logging In. This is most likely caused by an incorrect address specified, or the target Configuration Service Host is not online. It may also be caused by misconfiguration of the target Configuration Service host, or mis-matched binding configurations. You can check if the service host is properly configured via an http address by pointing the browser directly at the http address to make sure you get the WCF default service page. Also, to aid in debugging, this version of the Login Page will dump the entire exception for display, although you can change this behavior easily for production apps via login.aspx.cs. Exception is: System.ServiceModel.EndpointNotFoundException: Could not connect to http://euagueye/trade/config.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:80. ---> 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:80 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) 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() at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at ConfigService.ServiceConfigurationContract.IServiceConfiguration.login(ServiceUsers csUser) at ConfigService.ServiceConfigurationRemote.ServiceConfigurationClient.login(ServiceUsers loginUser) in C:\stockrtm\Configuration\ServiceConfigurationClient\ServiceConfigurationClient.cs:line 179 at ConfigService.ServiceConfiguration.Web.Login.processLogin() in c:\stocktrader\Configuration\ConfigManagementWeb\Login.aspx.cs:line 198
ababacar
Not sure what you mean about port 8080.....the way this works is as follows, for a default/typical install:

1) IIS and any IIS-hosted WCF services that are http-based listen on default port of 80 (which does not need to be specified in URL, IE defaults to this if http is the scheme and no port is specified).

2) Start up configweb by browsing to http://localhost/configweb. This should come up, verifying that IIS is indeed running on port 80.

3) At this point, your trade web app config svc is running (http://localhost/trade/config.svc) also on port 80, when accessing over http. So the login should work. If it does not (and I guess it doesn't given the error message above); I suggest opening the readme.html file (installed in StockTrader Start Menu group), and going to the section Checking the Installation. In there, you will find a link (or you can simply type http://localhost/trade/config.svc addressinto the browser directly), and see if any error message comes back, and report that error/exception message here......I will also note that on Vista, even port 80 is blocked (incoming) by default, so you should also look at the readme and see what ports to open up within your firewall to get all elements of the app working. If only hosting http-based services hosted within IIS, only port 80 should be required---so you can add http server to your list of firewall exceptions on Vista.

StockTrader optionally shows how to use WAS hosting in IIS 7 (Vista, Win Server 2008 and Win7 only) to host non-http endpoints, such as tcpip; in which case the installer automatically sets IIS to allow tcp connections over port 808; but this would only come into play if logging into a config service using a net.tcp://localhost/trade/config.svc via configweb login page.

-Greg
Greg Leake, Microsoft
Gregory Leake
FYI, you can of course setup IIS to listen on another port besides 80 (like 8080); and get all Trade elements and config services to respect this; however, the default install expects IIS to be on port 80; if not, then I need to get you steps to perform that will change endpoint addresses to the port you are actually using for IIS. Its just the installer itself installs all http-based services for the sample with a specified port of 80.

-Greg
Greg Leake, Microsoft
Gregory Leake
Hello, Many thanks for your reply.

Yes indeed, my IIS runs on 8080. So I need to modify (http://localhost/trade/config.svc) to (http://localhost:8080/trade/config.svc)to access the config page, otherwise I have the page "Internet cannot display the webpage".
My local config is
- XP professional
- IIS 5.1 with IIS 6 manager
- SQL 2008 Express
I do not know what changes I must to in .Net StockTrader to update this port number.

Kindest regards,
Ababacar
ababacar
I have changed the port setting of IIS to 80, so that I can launch properly the page http://localhost/trade/config.svc . But when I try to log in to the configweb with name = compositeadmin, password = yyy I get the following error:

Error Logging In. This is most likely caused by an incorrect address specified, or the target Configuration Service Host is not online. It may also be caused by misconfiguration of the target Configuration Service host, or mis-matched binding configurations. You can check if the service host is properly configured via an http address by pointing the browser directly at the http address to make sure you get the WCF default service page. Also, to aid in debugging, this version of the Login Page will dump the entire exception for display, although you can change this behavior easily for production apps via login.aspx.cs.

Exception is: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://euagueye/trade/config.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at ConfigService.ServiceConfigurationContract.IServiceConfiguration.login(ServiceUsers csUser) at ConfigService.ServiceConfigurationRemote.ServiceConfigurationClient.login(ServiceUsers loginUser) in C:\stockrtm\Configuration\ServiceConfigurationClient\ServiceConfigurationClient.cs:line 179 at ConfigService.ServiceConfiguration.Web.Login.processLogin() in c:\stocktrader\Configuration\ConfigManagementWeb\Login.aspx.cs:line 198


ababacar

Make sure you have:

1) uninstalled app
2)reset IIS to listen on port 80
3) re-installed stocktrader on that machine

If you need IIS to be on a different port (like 8080); after install you will need to open up the SQL Server config repository for Trade (TradeWebAppRepository database), open the table HostedServices using SQL Management Studio, and change the column named Port to a value of 8080 everywhere you see 80 listed as the port. Then you should issue a command IISRESET from a CMD prompt to ensure the trade web app is restarted.

You should do the same with the databases named BusinessServiceIISRepository; and for the other misc samples installed with StockTrader including CompositeWebAppRepository and ServiceBRepository, and SimpleClientRepository databases. These are all the samples in the kit that are hosted in IIS. The port number listed in the database column "Port" is what determines which port the services listen on. The installer install expects IIS to be on port 80 for IIS-hosted services.

-Greg


Greg Leake, Microsoft
Gregory Leake
thank
ababacar

You can use google to search for other answers

Custom Search

More Threads

• Does anyone have this working on a website somewhere?
• 2.03 Release Now Live
• Windows 7: StockTrader and ConfigWeb
• The exception encountered was: Invalid object name 'dbo.AccountProfile'
• Why can't I view the whole content of "Repository Creation Tool" ?
• The Test Connection Failed
• ConfigWeb help
• direct invocation of a web service
• Replace the Localhost with IP address
• .NET StockTrader SmartClient