Open RouterApp.sln in the before directory. This solution contains two projects: RouterClient and RouterService.
Note: these applications have various security features enabled through policy files.
Go to the Web References folder of the RouterClient project in Solution Explorer.
Right click on the localhost node, select Properties, and change URL Behavior to Dynamic. Repeat this step for each Web reference node (localhost1, localhost2, and localhost3).
Note: changing the URL Behavior property to dynamic causes the proxy class to read the endpoint URL from the application configuration file. You'll notice some new elements in the <appSettings> in app.config.
Right click the RouterService project and select Build.
Right click on the localhost node in the RouterClient project and select Update Web Reference. Repeat this step for each Web Reference node.
Open app.config in the RouterClient project and locate the <appSettings> element. Modify each URL mapping so the section looks like this:
<configuration>
...
<appSettings>
<add key="RouterClient.localhost. ViewInvoices"
value="http://localhost/router
/view.ashx"
/>
<add key="RouterClient.localhost1.
SubmitInvoice" value="http://localhost/router
/submit.ashx" />
<add key="RouterClient.localhost2.
ApproveInvoice" value="http://localhost/router/
approve.ashx" />
<add key="RouterClient.localhost3.
PayInvoice"
value="http://localhost/router/
pay.ashx"
/>
</appSettings> </configuration>
Note: these mappings will cause the client application to send its messages to the router virtual directory, which will then route them based on the referral instructions.
Save app.config.