thanks
YES, I am using VS2013 express for Desktop for the WCF service, the service host, and a test project (but I haven't yet got to the point to use the test project, just the console and the library)
Service Host code
(although I am unable to guess how to rewrite in
VB your C# sentence:
Console.WriteLine("The service is ready at {0}", baseAddress);
Imports System.ServiceModel
Imports System.ServiceModel.Description
Imports System.Windows.Forms
Module ProVB_Host
Public Sub Main()
Using svcHost As New ServiceModel.ServiceHost( _
GetType(WCFCalculatorLibrary.Calculator))
Dim netBind As New NetTcpBinding(SecurityMode.None)
svcHost.AddServiceEndpoint(GetType(WCFCalculatorLi brary.ICalculator),
netBind,
New Uri("net.tcp://localhost.9080/Calculator/"))
Dim smb As New ServiceMetadataBehavior
smb.HttpGetEnabled = True
Try
smb.HttpGetUrl = New Uri("http://localhost.9000/calculator/")
svcHost.Description.Behaviors.Add(smb)
svcHost.Open()
Catch ex As Exception
MessageBox.Show("Error " & Err.Number)
Debug.Print("Error " & Err.Number)
End Try
Console.WriteLine("Press <Enter> to close and end the Service Host, ProVB_Host")
Console.ReadLine()
Console.WriteLine("HOLA")
'Console.WriteLine("The service is ready at {0}", svcHost.BaseAddresses.Item(0).ToString)
Console.ReadLine()
End Using
End Sub
End Module
app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
yes, I'am typing
http://localhost:9000/calculator when the console is up and running (waiting for the user to press <Enter> or whatever other key)
Yes, now the two projects are in the same sln
I start xampp, having changed two lines in httpd.conf to listen port 90 instead of 80 (using 80 causes apache doesn't start up)
Listen 90
ServerName localhost:90
In Chrome, typing
http://localhost:9000/calculator (or Calculator), with the console up and running, always gives the same message: "webpage not available"