Wednesday, February 26, 2020
Sign-In  |  Sign-Up  |  Contact Us  |  Bookmark |  RSS Feed

Back up and Restore IIS 7 and IIS 7.5 website
IIS 7 and IIS 7.5 does not have UI for website back ups and you need to use appcmd.


appcmd list site "myWebSiteOnIIS" /config /xml > myWebSiteOnIIS.xml

appcmd add site "myWebSiteOnIIS" /in < myWebSiteOnIIS.xml

Posted On: 11/19/2012
Label: Editorials

ISAPI_Rewrite for IIS 7.5
IIS comes with URL rewrite module that you can use for URL rewrite, reverse proxy or other SEO friendly tasks. However, we also recommend to use ISAPI_Rewrite module. It is worth looking at it and comparing it to native URL rewrite of IIS 7.5.

Your starting point for ISAPI_Rewrite is ISAPI_Rewrite overview page.

Posted On: 12/09/2011
Label: Editorials

IIS MetaEdit
There is an easy way to manage your IIS sites. All you need to do is to use MetaEdit 2.2 tool that allows you to peer into configuration of your IIS settings. MetaEdit acts as RegEdit and it is even replicates the way UI is layed out. You can manage your IIS sites via this useful tool. In order to start you'll have to download it from the MSDN site MetaEdit 2.2
Posted On: 09/01/2011
Label: Editorials

Create IIS website programmatically
Windows OS comes with very handy executable that allows you to run .VBS file with your custom Visual Basic Scripts.

One of the task that you may implement as Visual Basic Script is creation of the IIS websites or IIS Virtual Roots.

In order to do that you need to create script that utilizes IIsWebVDirRootObj

Here is an example of the script that creates IIS Website

'---- VB Script starts
'Default instance of the site
Set IIsWebVDirRootObj = GetObject("IIS://localhost/W3SVC/1/Root") 

'Using ADSI Container we create Virtual Directory
Set IIsWebVDirObj = IIsWebVDirRootObj.Create("MyIIsWebVirtualDir", "MyNewVDir") 

'Set params on the newly created virtual folder
IIsWebVDirObj.Put "Path", "C:\MySiteDirectory"  
IIsWebVDirObj.Put "AccessRead", True 
IIsWebVDirObj.Put "AccessScript", True 

'Create website with AppCreate2 
IIsWebVDirObj.AppCreate2 1 
IIsWebVDirObj.Put "AppFriendlyName", "NewApp" 

'Use "SetInfo" to save the data to the metabase. 

'---- VB Script ends
Next, you need to save this file on your C: drive and give it .vbs extension. We saved it under C:\Temp\CreateSite.vbs

Finally, open your command line tool and type path to the Windows Scripting tool located in under system32: C:\WINDOWS\system32\wscript.exe. This tool accept one parameter which is our script file: C:\Temp\CreateSite.vbs

You should be able to see in your command line the following statement

C:>C:\WINDOWS\system32\wscript.exe C:\Temp\CreateSite.vbs

Your website is created if you don't see errors after you ran this command. Go to your IIS and check it for the new website we just created.

Posted On: 08/30/2011
Label: Editorials

Full IIS on Windows Azure
Windows Azure allows to run the Full Internet Information Services (Full IIS). It used to run only component called Hosted Web Core (HWC) which is limiting when compare to traditional IIS. For instance, Full IIS can now run multiple site on one Azure role.

Microsoft announced Full IIS for Azure at PDC 2010 and it is now part of Windows Azure SDK v1.3 which you can download from Microsoft website.

An example on how to set up more than one site within section looks like this:

 < Sites>
  < Site name="Web">
    < VirtualApplication name="WebAppOne" physicalDirectory="C:\Projects\WebAppOne\" />
    < Bindings>
      < Binding name="HttpIn" endpointName="HttpIn" />
    < /Bindings>
  < /Site>
  < Site name="WebAppTwo" physicalDirectory="C:\Projects\WebAppTwo">
    < Bindings>
      < Binding hostHeader="WebAppTwo.example.com" name="HttpIn" endpointName="HttpIn"/>
    < /Bindings>
  < /Site>
< /Sites>

Posted On: 05/24/2011
Label: Editorials

Running IIS on Windows Azure
It is now possible to run IIS on Windows Azure. IIS was not part of Azure platform from the beginning. This was rectified by Microsoft with the introduction of Full IIS. There is not a lot of information available about it on the net and it is not very well documented.

However, after looking around I was able to find few online resources that will get you started.

Full IIS

Hosting Multiple Sites from MSDN

Manage IIS via RDP

I hope this will be good enough to get you started with running IIS on Windows Azure.

Posted On: 05/24/2011
Label: Editorials

Programmatically Enabling IIS Compression
IIS Compression takes CPU time to compress files. It does keep compressed file in the cache but if CPU becomes a real issue you can programmatically disable IIS Compression.

Use your Page_Load() method for place holder for your IIS Compression code and provide the following code snippet there.

if (!String.IsNullOrEmpty(this.Request.ServerVariables["SERVER_SOFTWARE"])) this.Request.ServerVariables["IIS_EnableDynamicCompression"] = "1";

Posted On: 05/24/2011
Label: Editorials

List of Error for IIS 7.0 and 7.5
Have you ever wondered what errors are being handled by new IIS? I have and fond one link that is invaluble for this kind of information.

List of IIS 7.0 Error Messages

Posted On: 05/19/2011
Label: Editorials

What's New in IIS 7.0
IIS 7.0 is way more improved iteration of IIS release when all prior IIS versions combined. New IIS 7.0 is designed to enable administrators and developers to gain more access to the IIS 7.0 core and do a lot more with it. For instance, several important new features were added and proved to be very useful additions to the arsenal of both IIS admins and developers alike.

1. IIS 7.0 has capabilities of decreasing foot print on your server. This in turn allows you to tighten up areas of exploits by hackers.

2. Extensibility framework was introduced to allow creation of new web based solutions.

3. Web deployment and configuration is simplified allowing to deploy web apps fast and reliable.

4. Has built in resolution algorithm allowing you to find issue with your app quickly.

IIS 7.0 is based on new concepts in web server design. These concepts include modularity, unification, integration and new set of management tools. Moreover, IIS 7.0 can be effectively managed via HTTP with the introduction of Windows Process Activation Service (WAS).

You can always find more information about IIS 7.0 on Microsoft IIS site

Posted On: 05/19/2011
Label: Editorials

JanFebruary 2020Mar