Wednesday, July 30, 2014

use azure websites to redirect request traffic to another server

if you have a legit reason to not use CloudFare, you can use Azure Websites to redirect request traffic to your other servers. Taking advantage of Azure's Auto Scaling and microsoft data centre DDOS protection.

1) Create a blank file applicationHost.xdt in your azure website \site folder
2) add the following content in the file


3) save, and restart your azure website. This process will enable ARR in azure websites

4) add this in your azure website web.config configuration section


Done. The above example wil redirect all request because of the * wildcard pattern syntax. you can also use Regex , to redirect certain request, based on file type, or directory or etc.. (do some googling)

Monday, July 21, 2014

Anon Proxy : Configure Authentication for windows

just add Block - User Auth - Is Not - windows:yourcomputername - and save

just add any windows user with LogonUser permission. tested in all major browsers and Android AutoProxy

Friday, July 18, 2014

asp.net website does not recompile on file changes (web farm)

if you have a webfarm setup, and even though you make changes to app_code, global.asax or web.config, your sites do not seem to recompile (using old assemblies), you must force it to recompile.

how ?

use appcmd.exe


1) create a folder, say c:\x
2) assign full control to IIS_IUSRS to the folder
3) run this command in cmd.exe

c:\windows\system32\inetsrv\appcmd set config "myapppoolname" -commit:webroot -section:compilation -tempdirectory:%systemdrive%\x

voila! it doesn't have to be a different folder everytime you run it. it will still recompile. now whenever I do the changes to my website that needs to recompile, I will tell the servers in the webfarm to run that command.