Redirecting to Azure URL from DiscountASP.Net DNS

Their customer support took a long time to reply, made me go in circles and finally gave me a link, then I figured out what to do.

"You'll need to use the URL Rewrite module to achieve your idea. You will create a rule within your web.config to redirect any traffic requests to "(www.)xyz.com" to be sent to xyz.cloudapp.net. Update your web.config file or connect via IIS manager to create this rule (http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module)"

First you have to install an IIS extension which allows you to use your IIS manager (even Windows 8) to talk to their IIS.

http://www.iis.net/downloads/microsoft/iis-manager

It will download and execute an integrated installer which will install the extension.

Then you connect to DiscountASP.net using the below instructions:

https://support.discountasp.net/KB/a400/how-to-connect-to-windows-2008iis-7-using-microsoft.aspx

Once you connect, it will ask you whether to install some IIS extensions - say yes and install whatever you need to install, including the URL rewrite one.

Then create the rewrite URL rule using the instructions here:

http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

In my case, it was simple, just redirect everything from mysite.com OR www.mysite.com to azureurl.com

I created two rules as well.

Then, go to the control panel, DNS manager and set the IP address of your site to the DiscountASP.net IP address.

All requests will hit them first, then their IIS will rewrite the request and send it to Azure.

The only problem with this is that their IIS may go down when the number of requests increase.

I now have to talk to them about that.

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

The ridiculous interview experience