I have created locally stateless WebAPI and Statefull data service with the Visual Studio 2015. It is working perfectly in the local system and website access WebAPI service by implementing http://localhost:344/api/abc/getEmployee. Then I deployed service fabric application on Azure and received client URL
http://xyz.southeastasia.cloudapp.azure.com:1900/Explorer/index.html#/abc.apptype/app/abc.app/service/abc.app%252webservices
My problem is that how can I call my WebAPI controller and action from this Azure client URL?
http://xyz.southeastasia.cloudapp.azure.com:1900/api/abc/getEmployee is not working.
Note: This url is not secure and will use by mobile and website.
You're using the wrong port to access your application. Port 19000 is a Management endpoint.
Read this to setup your API. Run your app at port 80 (if possible),
Make sure that the Azure Load Balancer has a load balancing rule for port 80 external to port 80 on the cluster nodes. More info here.
You need to configure an inbound TCP rule for the port you want to use. Typically you will map an inbound port (such as port 80) to the port that your application is listening on (e.g. 344).
In the Azure management portal, find the resource group of your deployed Service Fabric service; in it, there should be a "Load Balancer" resource. -- Click on that.
In there, you should find a pane called "Load Balancing Rules" (it's easy to look past it with the light gray icon, it's right above "Inbound NAT Rules").
Using the button at the top of the configuration blade, "Add" a rule for the port that you need opened; You should give it a meaningful name (such as HTTP or WebAPI, etc.) -- for "Port" this is the publicly facing port that you want mapped (e.g. port 80 for HTTP), and for Backend port, you can put the port that you're actually listening on (e.g. 344).
Finally, don't expect it to work right away. -- You will see a little "Updating" bar, you have to wait for that to finish.
Related
I have hosted Flask Web application on Windows Server on AWS, I have done followings
hosted it on IIS and add new bindings(port 8090) to web site
Created inbound rule for the port(8090) given in bindings
And it works fine on the server, but when i'm trying to access it on my PC's web browser says
it cannot reach took too long to respond
What else i need to do ?
In your vm, different provider has their security policy. For aws even you have set inbound port rule, it will not work. You also need to set inbound rules in their potal.
👉(1) Open Windows firewall, Create an Inbound Port Rule.
👉(2) Directly in Amazon Web Service console, exactly in security groups/inbound.
When installing ASP.NET Core apps on a windows machine, I used to install the websites within IIS, I used the bindings there to route depending on the URL to the correct web application and I used Letsencrypt to create the SSL certificates.
Now I want to start shipping my applications using Docker. The samples show, how to easily create an ASP.NET Core dockerized project, but that's where most of them end. So in the end I've got an ASP.NET application in my docker running listening on port 5000.
Are there any suggestion or resources showing how to set it up on a production system?
multiple web sites listening on the standard ports 80 and 443 and forwaring to the correct docker image
SSL certificate handling
Setup ngingx as a front end. It is world-class solution, used by top-traffic sites as a front-end for incoming requests.
Among other features it does:
Redirecting based on plenty of rules
SSL management (you can use unencrypted connections behind it)
Load balancing
It is free and available as docker image.
So, you open only ngingx outside your docker network, and make it route all your traffic inside.
Setup reverse proxy like nginx, even in IIS also you redirect to corresponding docker service having a particular port. You can fan out traffic to respective ports.
Image: https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/
I'm building a small web application for a personal project. It will be an Angular web application which will talk to a Spring-Boot service layer which in turn will read/write stuff to MongoDb.
I hope to host all this on a single EC2 instance in AWS. My question is how to configure a web server (like Apache but doesn't have to be) to 'beautify' the URLs a bit. Example, without touching anything angular will run at something like host:4200 and the service layer at host:8080. I will then have to map a proper domain to host in AWS, but the hiding of ports etc is where it gets murky for me.
I want to be able to hit my web app at domain.com (no ports etc) and I also want my service layer to ideally have a similar setup e.g. domain.com/service (no ports etc).
How do I configure a webservice to do this for me? Examples or pointers to specific examples would be ideal, but even a pointer to the right documentation will be helpful.
This thread is kind of similar to what I want but not too helpful: How to deploy Spring framework backend and Angular 2 frontend application in any online server?
You can use a setup with AWS CloudFront as reverse proxy and CDN cache. You can map the Domain Name and SSL Certificates(You can use AWS issued free SSL Certificates through AWS Certificate Manager) to CloudFront while the EC2 instance is plugged as an origin behind CloudFront as shown in the following diagram.
In the diagram I have optionally added, which is a common practice in designing applications in AWS.
Hosting the Angular App in S3
Using Autoscaling & Loadbalancing for EC2 instances.
You need to use Apache or other web server as a reverse proxy. Start here -
https://devops.profitbricks.com/tutorials/configure-apache-as-a-reverse-proxy-using-mod_proxy-on-ubuntu/
You then will need to setup a custom domain name. The easiest option is to just use an ELB (now called Classic Load Balancer). More details are here -
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html
I have an application running in my personal network. This application can send emails to users and they can acknowledge the receipt via the email they receive as long as they are on my personal network. This is because they have to access the application to perform the acknowledge action.
I want to extend this and see if I can allow acknowledgements via emails from outside the network as well. I know I have to change my application to do this but not sure which way to go. Can some one throw some light?
My application is a spring based web application.
You need to configure your firewall to allow outside access to whatever port the app runs on.
You need to configure port fowarding on your gateway to direct outside traffic to the system running your app (unless your gateway is the server running the app).
After that you should just be able to go to youroutfacingip:portforapp
for example http://123.456.78.90:12345
in a web browser anywhere
you can setup DNS if you want to use a URL instead of an ip.
Keep in mind, anyone can go to this url, so make sure it has access control.
I have installed a middleware component and websphere 7.0 was installed as part of this middleware installation. I have deployed Maximo 7.5 application ear (maximo.ear) in this websphere 7.0.
I am quite successful accessing this application in SMART cloud Instance.
I have disabled the Windows firewall setting as well. But still it is not working.
I don't know where to configure and what to configure to access this Maximo application from public internet which is deployed in websphere server.
Usually you need to open a port for access from outside your network. As I don't know enough of your setup here a some steps to help you on your way.
check which port is required to be open, default maximo is port 80 (most http servers are default port 80.
check if you have a public ip address (this is a requirement). If you don't have a public address you can use dns tools to forward traffic to you.
open the port on your router, this can be different on routers, but the key point is to open the port you found in step 1 (probably port 80)
**
to check which port you need to open is simple:
**
if your address looks like http://ipaddressornameofyourserver/maximo then it's port 80.
if it's something like http://ipaddressornameofyourserver:****/maximo the **** is your port.
to check if you have a public ip
ask you isp
check your ip using whatsmyip (see if it changes from time to time, if it changes you don't have a public IP, but this could take some time)
ask your IT personnel, if you're not from the IT department yourself and if you have an IT department.
to open the port in your router
check with the it department (again if you are not the in the department yourself or if you are part of it)
consult your router guides
Usually you will find it under:
port forwarding
application ports
firewall rules
don't forget
Sometimes their are both a firewall (hardware or software) that could block traffic going to/from you server, please allow or disable that firewall too. Remember this is not the same firewall found on your server (the one you already disabled)