IIS Reverse Proxy disconnect

I am trying to setup a reverse proxy in IIS. I have followed the instructions provided…

      http://osswald.com/xojo/RealStudioWebEditionStandAloneWindowsServerDeployment.pdf

.
I am using http://192.168.2.108:8881/{R:1} as the rewrite URL.

When trying to access the web app from the WAN I get the web app’s default DisconnectMessage. So the reverse proxy must be working to redirect the request to the WebApp.

I suspect that the problem lies in the fact the web app is running on a machine using a local IP address. The WAN address is mapped by the router to the local IP. To access the web app we are use, for example…

http://mywanurl.com/myIISsite

mywanUR.com is mapped to 192.168.2.108 and myIISsite is te name of the site in IIS being used for the Reverse Proxy.

Any idea what more I can to make this work?

I find IIS to be too much hassle to get Xojo apps working. Unless you absolutely need it to support other ASP.NET apps running on the same box I recommend just purchasing Abyss web server. It handles SSL and reverse proxies very easily and reliably.

To answer your actual question… my guess is you need to rewrite the response as well. If you dig into the javascript tools you may find that the initial connection to http://mywanurl.com/myIISsite works but the javascript Is trying to connect to http://192.168.2.108:8881

The javascript will not be permitted to access a totally different URL despite you and I knowing its the same site. You want IIS to change the 192.168.2.108 to mywanurl.com/myIISsite.

mywanUrl.com needs to be mapped to the public ip address of your router with NAT rules to redirect traffic to your IIS instance.

I find IIS easy to configure with Xojo Apps, but you need to know how to configure upstream components to correctly route the request.

Preview
@Phillip Z Gota use a IIS as we have multipe IIS websites running on this machine.

@Wayne Golding Thanks I think you have pointed out our mistake. I do not have control of the router, but have passed on your response to the administrator of the router.

I usually prefer using internal dns to properly map server addresses to internal ips. Doing hairpin nat, while it works, is extra load through the router which you do not need. If you don’t have an internal dns server already, then your router may have the option of static cached dns which will work fine as well.

Got it working. Here is what I had to do. Note: I am running IIS 6.1 on Windows Server 2008 R2…

  1. I had created the reverse proxy site inside my Default Web Site. I created a new web site under sites and set the physical directory to the same physical directory as I used in the site under my Default Web site.

  2. With the new site selected I clicked URL Rewrite rule and saw that the rule I created for the site in the Default Web Site was in fact still in play for my new site.

  3. I then Right clicked the new site, saw an option for “Edit Bindings” and selected it.

  4. Entered the local address that mywanurl.com was mapped to, i.e. 192.168.2.125. Set port = 80 and the Host Name = mywanurl.com

That was it. Usning mywanurl.com brings up my xojo web app every time now without a disconnect and all my other IIS sites in the Default Web Site continue to work no problem. Works great!

Thanks for the help.

John