Windows 2-3 Tier Architecture Conversion with IIS
In a previous blog post, we explored the transformation of legacy two-tier architecture applications into three-tier architecture using Oracle's OHS server. Today, we'll delve into achieving the same result using Microsoft's IIS server.
Introduction
Unlocking Security Layers with IIS:
If you've been managing IIS-based applications and wish to bolster their security by introducing a third layer for the web, we have a solution for you. This involves IIS serving as a Reverse Proxy, akin to the role OHS played in our previous example.
Process
There is no need to create a Web Portal containing only wrapper calls to the APP server where all your business logic lies in the form of API based application. You can create a robust application with direct DB calls hosted on the APP server and then showcase the same application without any coding expertise to a Web Layer. And then every end user will be using the web interface only without any direct access to the App Layer making it shielded by your web layer.
You web layer will act as a contained for forwarding all your requests from the web layer to app layer and then responding back the responses received from app layer to the end user from web layer. And the best part is, the end user will still be working the URL/Address provided by the web layer and not the app layer.
What makes it more secure is that you can change the communication ports between the WEB and APP layer to some non-standard port service number which will again make it difficult to directly access the APP/DB layer from the Web Layer.
Also, if you want, you can use the SSL offloading facility also so that the communication between Web and App layer can be worked out on NON-SSL port also.
Benefits of using IIS over OHS
Firstly, Details regarding setting up the IIS as we layer is more freely available in the open domain. Which makes it easy to troubleshoot issues with IIS in comparison to OHS.
Secondly, most of the settings are available with GUI interface in IIS. So, User Friendliness.
Thirdly, as IIS is handing the requests over App also, so it will be easy for your developer to cope up with Web Layer again as it is also going to be on IIS server only.
Moving forward, you can make multiple rules with URL rewrite here to forward request to any node on the app layer as you require. This makes it easy to handle multiple requests from different app layer applications from one web layer application in front. User will always be having One Stop Solution for all the application usage on the Web Layer in spite of having multiple back-end applications at the app layer.
Let's go step by step!!
So, how do we make it possible. You may follow the given below steps for the same:
Step 1. You host your IIS based Application over the APP layer. How do you do it.
You create a Folder on your APP server. Put down the published ASP.NET, ASP.NET MVC or PHP or any application hostable on IIS there. Then you go to INETMGR (IIS Manager Application on your windows server) and Create a Website for e.g. AppLayer
This AppLayer website's virtual path on the IIS server will be / (root).
Then you host your web application within this AppLayer website by create multiple child folders as in picture below where your actual WebApplication/APIs lies:
Step 2. You need to Install IIS over the Web Layer now from Server Manager.
Step 3. After you install the IIS over the Web Layer, move to the ARR installation. ARR stands for Application Request Routing. It will be available from this link to download.
Step 4. After installation, close the IIS server Manager over Web Layer and reopen it to see the ARR application in the IIS on the right middle pane. Now, open it and enable the proxy routing rule from the right most action pane. And do not write any URL rewrite rule there. Use the application rewrite rules over Web Sites instead on the Server itself, as that will route all the request coming over to the server to the location, where you put the proxy server URL.
Step 5. Now, create a website with 443 port and SSL binding on the Web Layer and use the URL rewrite module (if you do not have it you can download it from below and then restart IIS Server Manager application) to route all requests that come to your Web Layer over:
https://webLayer.in/MyApps/ (Incoming Request Inbound Rule)
to
https://appLayer.in/MyApps/ (Incoming Request Rewrite Rule)
Now, the user will be able to access all the website hosted on App Layer
as
WebApp1
WebApp2
from the same URL https://webLayer.in/MyApps/ typing in below URLs in the browser
https://webLayer.in/MyApps/WebApp1
https://webLayer.in/MyApps/ WebApp2
P.S. https://webLayer.in is the domain name for the IIS hosted Website over Web Layer
Comments
Post a Comment
Provide your valuable feedback, we would love to hear from you!! Follow our WhatsApp Channel at
https://whatsapp.com/channel/0029VaKapP65a23urLOUs40y