I need help.
I am getting SocketException: Cannot assign requested address. It happens when i try to access serviceA by serviceB via Refit. If run one of the services on IIS or in Visual studio debugger everything works fine. But when i run them both in docker containers, system throw that error.
It also happens when use Ocelot. If the gateway service is on IIS or run in debugger (separate from other services) it works, but when I put it in container with the other services i get the error.
What could it be?
WIN 10
VS 2019/VS Code
Docker desktop
WEB API CORE 3
Refit - https://github.com/reactiveui/refit
Ocelot - https://github.com/ThreeMammals/Ocelot
Thank you
Actually the question is kind of duplication of the following one Unable to access a locally hosted wcf service over the internet but with only difference that the service is hosted by a windows service on Azure Virtual Machine.
I can access the service on the machine and I have added an endpoint to the service port at Azure Configuration console, but still cannot access the service over the Internet.
The error message that is not possible to set up connection.
Is my scenario technical possible on azure? if yes - what is done wrong?
The answer to my question was pretty straightforward. Although I opened my endpoint in Azure Management Console the port was blocked by the virtual machine firewall (windows firewall). After setting in- and out- tcp port rule, the problem had gone.
I am developing a solution that is composed of two elements: a web server, which publishes some REST services, and a mobile client, which consumes those services.
To implement the REST services I have used the Web API technology.
When I start the web project in debug, everything works fine. I can use the services by pointing to localhost:63954/api. A weird fact: if I change "localhost" with "127.0.0.1" or with the LAN address of the machine, 192.168.xxx.xxx, the server does not answer anymore!
Then, when I start the Windows Phone client, which runs in a virtualized emulator, it fails to connect to the web server! Even if the two components are running in the same machine.
Obviously, in Windows Phone I cannot use the "localhost", since the localhost of the phone is the phone itself. So I'm trying to use the 192.168.xxx.xxx address which is the address of the machine that is running the web service. But the mobile phone emulator fails to reach the webservice.
I need to run the Web Server in Visual Studio 2012, since I need to debug it, and to make it reachable from the Windows Phone Emulator, but I do not know how to do it. Can you help me? Any idea?
Thank you so much,
Riccardo.
EDIT: By following the link found here (Binding IIS Express to an IP Address) and by turning off my firewall I can run the web application outside VS12 and I can make it reachable from other pc in the network, and so also from the WP emulator. This could be a work-around, but I cannot debug the REST service in VS in this way and this is not good...
The Windows Phone 8 emulator works as a separate machine on your network, with it's own IP address and configuration. Therefore, for the emulator to be able to access your service you will need to make sure that the port you are trying to access is open for inbound connections.
As you mentioned the windows phone is running seprate in your client machine,One way of solving this problem is ,Binding your machine's Ip address to the Web Api,SO the Web api can be accessed using the Machine's Ip address.You can Bind the ip address to the project by using Microsoft Webmatrix.
So,You can access the web Api using the Ip address.Hope this helps.
I'm having some trouble with a WCF Service. When I host it in IIS, it runs fine, but I figure there is a problem somewhere.
When I run my WCF Service in Visual Studio 2010, it brings up the WCF Service Host.
It names the host, then the status is 'Error'.
The error it gave is this:
System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:8732/Design_Time_Addresses/EvalServiceLibrary/Service1/. Another application has already registered this URL with HTTP.SYS. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://+:8732/Design_Time_Addresses/EvalServiceLibrary/Service1/' because it conflicts with an existing registration on the machine.
I don't know if this has affected the service deployed in IIS, since that tells me I have created a service if I browse it through IIS.
Any ideas?
It's pretty clear, the address is already in use.
Does the service in IIS run on the same port? Change it, or change your port for the development.
In work we have a set of WCF services which handle thousands upon thousands of transations a day and have decided to use windows NLB and a server farm to handle the Services traffic. We have a virtual IP which will be used for all incoming trafic to the services, 2 servers which will host the WCF services and a 3rd server which hosts the SQL server databases. Our services are stateless.
I have been trawling the internet via Bing and Google looking for some tutorials and videos on how to set up NLB and can not find anything that shows/explains how to set it up from scratch as I am a complete novice.
Can anyone help??