Asp.net core application is not accessible from an external load balanced Azure VM - asp.net-core

I have created a VM behind an external load balancer in Azure and I am using IIS as the reverse proxy webserver to host the asp.net core application.
I am able to access the application inside the VM using localhost but not able to access the same from my client machine through the public ip configured for the loadbalancer.
I have configured loadbalancing rules for incoming traffic on port 80 and port 443 for the loadbalancer and specified appropriate NSGs for those ports.
Before deploying the asp.net core application I was able to access the defaultwebsite from my client machine. so I assume that inbound rules are taken in to account and working fine.
This is a self contained application and since I am able to access the application inside the VM through localhost I assume that the aspnet hosting module and other configuration required is proper.
Please let me know if there is anything else I can be missing.

I guess i have figured out what the issue is.
The Loadbalancer probe for the application is configured to be Http since its a webserver and is instructed to check at the default path "/" and since the application i have created does not serve anything on "/" its considering the node as unhealthy and does not respond or serve anything.
I changed the probe to tcp and it works just fine.
Thanks,
Teja

Related

How to do a reverse proxy for application behind port and directory?

Hi i've an application of that i hosted in docker, that is an openfire (xmpp) server , the openfire has several feature like web client and located in port localhost:7443/inverse for example
in my server that contain docker I've managed several application to use reverse proxy and working fine, but I cannot do on localhost:7443/inverse to https://webapp.localhost
Please give me some advice how to do it on apache2 webserver

Service-hosted WCF behind the load balancer

I have 3 servers and a load balancer. Servers names are:
server-11
server-12
server-13
And the balancer's name is:
server-01
Everything works in the intranet, in my local network.
I have IIS-hosted websites at servers, and I access them like that: http://server-01:12321 for example, and it forwards me to some of the server.
Now I need to set up an existing WCF service with WSHttpBinding the same way - install it at all 3 servers (already done) and access it via load balancer. The problem is: my WCF-service is not hosted in IIS, it is hosted in windows service.
Another problem is: I want to have an url for that WCF-service like http://myservice, so when I open it, it will get me to the http://server-01:80 and then load balancer will forward it to some server.
Is it possible? I believe I should set some DNS record somewhere? And what settings are to be made in the load balancer? And what changes should I make in the WCF-service itself?
Another difficulty is that 80 port is already occupied (with several websites hostnames), so I have to use hostname (http://myservice). To be clear: in IIS I can set a hostname for the website, but how to do this with WCF-service, that is hosted in windows service?

IBM HTTP Server configured to communicate with websphere to serve http/https

I have 2 IBM HTTP servers with ip's 10.10.10.2 & 10.10.10.3 with http(port 80) and https(port 443). I have also WAS on 10.10.10.4 with http(port 80) and https(port 443). Now, I have to setup the two http servers with single domain name and forward http/https requests of dynamic contents to whebsphere.
I don't know how to do that. Can anyone help me about that with an example or decent document??
I read about virtual hosts and also about http-plugin but i couldn't understand the difference or what is the specific use of each?
HTTPplugin is a WebSphere component that allows the Web Servers to communicate with the WAS Server.
VirtualHost is a configuration inside WAS.
When you deploy any web app, you will associate them with a Virtual Host.
Virtualhost is a collection of supported IP & Port numbers.
In your case, you have a domain name (say test.abc.com that receives requests at 80 and 443)
Create a virtual host that contains two entries
test.abc.com:80
test.abc.com:443
When you deploy a Web App, then associate it with this virtual host.
Generate the generic plugin (i am assuming you have not defined a Web Server configuration in WAS) and copy the generated plugin files to the Web Servers.
The HTTP Plugin would use this plugin file and route requests for Web Apps to the Application Server.
This article is very old but the basics mentioned here still hold true
http://public.dhe.ibm.com/software/dw/wes/pdf/WASWebserverplug-in.pdf
HTH
Manglu

Hosting website on Azure Virtual Machine

Yesterday I created an Azure Virtual Machine using the simple Win2008r2 + SQL2008r2 image.
I have deployed a website to the VM via an RDP session.
I am able to browse the website locally (via RDP) using
"http://localhost"
I understand that I need to add an Azure endpoint for port 80 to enable me to browse to the site from an external machine.
I have configured the Windows Firewall on the Azure VM to allow traffic on Port 80 inbound and outbound.
Could anyone please advise what I've missed or what I can do to troubleshoot?
---Update-----
I have learned a little more this morning. The website that I'm trying to host on the VM is an installation of Interwoven Teamsite v7.3.x. When I looked in IIS I could see that the "Default Web Site" was stopped. Another website called "TeamSiteSitePubPreview" had been created but was only bound to port 81.
So, what was presenting the website I could see when I browsed to
http://localhost locally?
I ran netstat -ano and this showed me that PID 1604 what listening on port 80. I then ran Process Explorer which told me that PID 1604 was allocated to "Appache HTTP Server".
I know nothing about About Appache, can anyone tell me if there's some Apache config that will be preventing connections from outside of the local server?
For reference, I just tested this sequence and it gives you a website accessible over the Internet:
Create a new Windows Azure virtual machine with the Windows Server 2008 R2 SP1 image.
Add an endpoint on public port 80, private port 80.
While the endpoint is being created, start setting the server up.
Remote Desktop in.
Add the Web Server (IIS) role with default settings.
Test the connection. You should get a HTTP 200 OK status.
If you want to troubleshoot your server, start checking for errors in the event log. Check also the website bindings in IIS (Port 80, IP Address *).
Also consider the connection issue might be on the client (your) side. For instance, DNS caching. Try connecting from another machine with direct Internet connection (such as another cloud server) or from a service such as isup.me.
Additionally, if all you want is to host websites in IIS, the Web Sites service has a more streamlined experience.
You will need to create an endpoint on port 80 thru Windows Azure Management portal as well. This endpoint opens a port in the Windows Azure Load-balancer.
Navigate to your VM within the portal and create a new Endpoint under the Endpoints screen of VM configuration within Azure management portal.

Problem in deployment of wcf service using localhost in service url

I have created and deployed the wcf service on server as a windows service, with url in app.config as "http://localhost:portnumber/...." I am accessing this wcf service from browser of client machine(Client machine is different from server) by using url "http://servername:portnumber/......" but I am not able to access it because it seems my client request redirected to localhost and not to server. Can anyone help me regarding this?
My another question related to this is do I have to deploy service using servername in the url or localhost is all right, what is the best way?
Change the URL in the config file to point to the actual server. That's all you need to do.
localhost is their local machine, or when you're developing your local machine, which is why it works in development.