JavaScript URL Redirects

File: urlredirect.js

function redirectUrl(url)

    var result =[
        {‘test.aspx’ : ‘’},


    $.each(result, function(k, v) {
        for(var prop in v){
                //alert(prop + ‘ is ‘ + v[prop]);
                if (url.toLowerCase().indexOf(prop.toLowerCase()) > -1) {
                    //alert(‘redirect to ‘ + v[prop]);
                    window.location.href = v[prop];



Quick & easy way to turn your website black and white with CSS

1. Change text color to black using CSS.

2. Change background color from any colors to grey using CSS.

3. Turn all images to black & white using CSS.

  -webkit-filter: grayscale(1); /* Older Webkit */
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
  filter: grayscale(100%);
  filter: url("data:image/svg+xml;utf8,<svg xmlns=’’><filter id=’grayscale’><feColorMatrix type=’matrix’ values=’0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0’/></filter></svg>#grayscale"); /* Firefox 4+ */
  filter: gray; /* IE 6-9 */   

You can specify !important to overrides the style.


Easy way to migrate IIS Websites using Web Deploy 3.5

Web Deploy (msdeploy) simplifies deployment of Web applications and Web sites to IIS servers. Administrators can use Web Deploy to synchronize IIS servers or to migrate to newer versions of IIS. Web Deploy Tool also enables administrators and delegated users to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.

  • Seamless integration with IIS Manager (IIS7 and above), Visual Studio (2010 and above)for creating packages and deploying them onto a machine, both locally and remotely.
  • Integration with WebMatrix for deploying and downloading web applications.
  • Seamless integration with the Web Platform Installer to install community web applications simply and easily.
  • Web application packaging, such as ability to package a Web application or an entire site, including the associated databases.
  • Ability to package ACLs, COM, GAC and registry settings.
  • Supports both live servers and zipped packages as a source or destination.
  • Web application deployment with administrative privileges are not required in order to deploy Web applications.
  • Ability to add powerful parameters to change text in files when they are deployed (such as prompting to replace a connection string when deploying from QA to staging environments).
  • Integration with the IIS Web Management Service (WMSVC) for remote deployment by non-administrators.
  • Server administrators have granular control over the operations that can be performed and can delegate tasks to non-administrators.
  • Web server migration and synchronization, such as ability to synchronize or migrate the entire Web server, a Web site or application.
  • Synchronizes only the data that has changed.
  • Ability to detect missing dependencies during synchronization.
  • Automatically gathers content, IIS configuration, SSL certificates and ASP.NET configuration when you sync a Web site.
  • Automatic backup of Web Sites before making any changes.
  • Administrator can configure Web Deploy such that it creates and store backup of websites on the server.
  • End users can directly restore their websites without admins involvement.
  • In addition to the IIS Manager, Visual Studio 10, Web Matrix tasks can be performed using the command-line, PowerShell Cmdlets or public APIs.

Download and install Web Deploy 3.5. Please note that the default installation location will be on
C:\Program Files\IIS\Microsoft Web Deploy V3

Command Line

Start msdeploy service:

net start msdepsvc

View your site dependencies:

msdeploy -verb:getDependencies -source:apphostconfig="website"

Backup the existing website configuration:

%windir%\system32\inetsrv\appcmd add backup “PreWebDeploy”

Create a package from source server:

msdeploy -verb:sync -source:apphostconfig="website" -dest:package=c:\ > WebDeployPackage.log

Validate a package on destination server:

msdeploy -verb:sync -source:package=c:\ -dest:source:apphostconfig="website" -whatif > WebDeploySync.log

Deploy a package on destination server:

msdeploy -verb:sync -source:package=c:\ -dest:source:apphostconfig="website" > WebDeploySync.log

Validate direct deploy on destination server (Sync – Pull):

msdeploy -verb:sync -source:apphostconfig="website",computername=servername -dest:apphostconfig="website" -whatif > WebDeploySync.log

Direct deploy on destination server(Sync – Pull)

msdeploy -verb:sync -source:apphostconfig="website",computername=servername  -dest:apphostconfig="website"

NS Lookup Usage > Query for the mail exchanger data

nslookup [-option] [hostname] [server]
Commands:   (identifiers are shown in uppercase, [] means optional)

 NAME            - print info about the host/domain NAME using default 
 NAME1 NAME2     - as above, but use NAME2 as server
 help or ?       - print info on common commands
 set OPTION      - set an option

    all                 - print options, current server and host
    [no]debug           - print debugging information
    [no]d2              - print exhaustive debugging information
    [no]defname         - append domain name to each query
    [no]recurse         - ask for recursive answer to query
    [no]search          - use domain search list
    [no]vc              - always use a virtual circuit
    domain=NAME         - set default domain name to NAME
    srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1, N2, 
                          and so on
    root=NAME           - set root server to NAME
    retry=X             - set number of retries to X
    timeout=X           - set initial time-out interval to X seconds
    type=X              - set query type (for example, A, ANY, CNAME, MX, 
                          NS, PTR, SOA, SRV)
    querytype=X         - same as type
    class=X             - set query class (for example, IN (Internet), ANY)
    [no]msxfr           - use MS fast zone transfer
    ixfrver=X           - current version to use in IXFR transfer request

 server NAME     - set default server to NAME, using current default server
 lserver NAME    - set default server to NAME, using initial server
 finger [USER]   - finger the optional NAME at the current default host
 root            - set current default server to the root
 ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to 

    -a          -  list canonical names and aliases
    -d          -  list all records
    -t TYPE     -  list records of the given type (for example, A, CNAME, 
                   MX, NS, PTR, and so on)

 view FILE       - sort an 'ls' output file and view it with pg
 exit            - exit the program
 C:\> nslookup
   Default Server:

   > set q=mx
   > mailhost
   Address:     MX preference = 0, mail exchanger =
                      internet address =

Testing SMTP using Telnet

Open Command Prompt

1. Telnet [mailserver/ip] [port]

2. Type “EHLO” and hit enter.

3. Type “MAIL” and hit enter.

4. Type “RCPT” and hit enter.

5. Type “DATA” and hit enter.

6. Type your message body and hit enter.

7. Type ” . ” to end the message and press enter.

If you received the mail then your SMTP is working fine.

Solve Cross-Domain iFrame access denied issue

Sitemap Generator