Automating IIS Web tasks using AppCmd command

Requirement: You need to automate the management like create, start, stop, etc., of IIS Resources including Web Site, App, AppPool, etc. Solution: Microsoft provides a command line tool named Appcmd.exe which ships/installs along with IIS.  It’s usually located at C:\WINDOWS\system32\inetsrv\appcmd.exe path. Automation Examples: Create an APPPOOL, with specified name, .Net Framework version, Managed pipeline mode, etc., C:\>C:\WINDOWS\system32\inetsrv\appcmd.exe ADD APPPOOL /name:TestAppPool /managedRuntimeVersion:v4.0 /managedPipelineMode:”Integrated” APPPOOL object “TestAppPool” added C:\> Stop an APPPOOL PS C:\> C:\WINDOWS\system32\inetsrv\appcmd.exe STOP APPPOOL TestAppPool “TestAppPool” successfully stopped PS C:\> Start an APPPOOL PS C:\> C:\WINDOWS\system32\inetsrv\appcmd.exe START APPPOOL TestAppPool “TestAppPool” successfully started. PS C:\> Create a web Application under […]

Read more

Implementing URL Redirection using NetScaler Responder Feature

Requirement: You are migrating a web solution from old setup/server to a new setup/server, you will be publishing a new URL to access the solution from the new setup/server.  You want to automatically redirect any attempts to access through the old URL to the new URL.  You want users to see the OLD URL in the browser changed over to the NEW URL. Its also, often a requirement in case of company merges where the purchased company want all access attempts to bought company web site to be redirected to the new company URL.  Its also a requirement in case […]

Read more

FIX: The request does not contain a certificate template extension or the CertificateTemplate request attribute

Scenario: You require to generate a SSL Certificate from your enterprise CA to implement SSL communication for a web site on your Web Server.  You are running your web site under IIS on a Windows Server 2008 R2 Web server.  You have your enterprise CA hosted on Windows Server 2012 within your domain.  You create a Certificate request .Req file using “Create Certificate Request…” from IIS and use that .Req file on your CA console to submit the request using “Submit new request…” option, then your CA console reports the below mentioned error message and doesn’t generate you a certificate […]

Read more