Cannot connect Callback servce
-
8. března 2012 11:38
Environment: VS2010 Express VB
OS: Windows 7 ProfessionalI have written a client to communicate with a Web-Service. For this service I had to implement a Callback Service to receive the result asynchronsly .
When I execute my application, I can check my callback service with http://localhost:14098/ImportCallback and it seems to be. However,when I try to call the service with an IP address http://172.16.50.23:14098/ImportCallback, I do not get a TCP connection.
I have checked my firewall, etc
The sysinternal tool tcpview displays the following entry:
System 4 TCP 127.0.0.1 14098 0.0.0.0 0 LISTENING
<binding name="BasicHttpBinding_IImportServiceCallback" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding>
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.Single, IncludeExceptionDetailInFaults:=True, Namespace:="http://schemas.frequentis.com/iccs/conacs/1.0")> Public Class ConacsCallbackHost Implements IImportServiceCallback, IDisposable ' Singleton ..... Public Sub New(ByVal aUri As String) MyBase.New() Dim serviceAddress As Uri = New Uri(aUri) serviceHost = New ServiceHost(Me, serviceAddress) Try Dim binding As BasicHttpBinding = New BasicHttpBinding("BasicHttpBinding_IImportServiceCallback") binding.Namespace = cSchemaNamespace Dim metaDatabehavior As ServiceMetadataBehavior = New ServiceMetadataBehavior metaDatabehavior.HttpGetEnabled = vbTrue serviceHost.Description.Behaviors.Add(metaDatabehavior) serviceHost.AddServiceEndpoint( _ GetType(IImportServiceCallback), _ binding, _ serviceAddress) serviceHost.Open()KRMichael
Všechny reakce
-
9. března 2012 6:10Moderátor
Hi,
What your meaning is that when you are calling the callback service with an IP address, then you cannot get a TCP connection. But I want to know What error message did you get? You can try hosting the WCF service under IIS. As for this error, maybe the firewall is blocking the request and make net.tcp listeners adapter was present.
Regards,
Peter
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
- Upravený Peter pi - MSFTModerator 9. března 2012 6:12
-
13. března 2012 11:42
Sorry for the delay.
I am trying to develop the client version which runs under Windows 7. The service (A) itself is using a Web Service callback, which runs on my client PC. The callback should be invoked after I have sent a request to the service A.
I am not sure what You mean with the net.tcp listener. Since I am using the WCF framework I do not have to operate with the Net.TCP framework.
However, my callback is actually running. Is it possible, that the cause for my problem may be that the service runs under 127.0.0.1?
The sysinternal tool tcpview displays the following entry:
System 4 TCP 127.0.0.1 14098 0.0.0.0 0 LISTENING
KR
Michael
- Označen jako odpověď MichaelSUM 13. března 2012 15:50
- Zrušeno označení jako odpověď MichaelSUM 13. března 2012 15:50
-
13. března 2012 15:54
I could solve the problem now by myself.
The reason was that I have added IPlistener entries as described in Configuring HTTP and HTTPS.
After I have deleted the two entries I could invoke my service successfully.
netsh http delete iplisten 0.0.0.0:14098 netsh http delete iplisten 127.0.0.1:14098
KR
Michael
- Označen jako odpověď MichaelSUM 13. března 2012 15:54