In IIS Manager, create URL rewrite rules to redirect incoming Web requests to the microservice.
Before you begin
To perform this task, you need to have the following IIS add-ons installed:
- URL Rewrite
- Application Request Routing (ARR)
If you do not already have these add-ons installed, you can download and install both using the Microsoft Web Platform Installer (WebPI for short), which is available here: http://www.microsoft.com/web/downloads/platform.aspx
Procedure
- On the Windows machine that contains your .NET Web application, open Internet Information Services (IIS) Manager.
- In the tree view, navigate to the .NET Web application.
- In the IIS area of the content view, double-click URL Rewrite.
- In the Actions pane, select Add Rule(s).
- In the Add Rule(s) dialog that opens, in the Inbound and Outbound Rules area, select Reverse Proxy and click OK.
The dialog closes and an Add Reverse Proxy Rules dialog opens.
- In the Inbound Rules area, under Enter the server name or the IP address where HTTP requests will be forwarded, enter the URL of the Content Service microservice, but without the leading http://. If you installed to a default port, you enter localhost:8081/content.svc in the field.
- Click OK to submit your changes.
- Close IIS Manager.
Results
All requests to the .NET Web application are now redirected to the microservice you configured.