Saturday, May 15, 2010

Creating website, application pool and cascading web applications programmatically

If you have ever tried creating a website in IIS 6.0 by using WMI object model you would know that it is not easiest thing to do. There was no native support from IIS object model, IIS 7.0 has much improved Application Programming Interface (API) set , it quite simpler and straight forward.

Microsoft.Web.Administration is name space which contains majority of server objects, it also provides a convenient way of manipulating configuration files including AdministrationHost File, All APIs in IIS 7.0 object model are managed code.

Here is code listing to create a simple HelloWorld site (You need to add reference to Microsoft.Web.Administration namespace, it usually located at C:\Windows\System32\inetsrv


Creating a website, application pool and application

ServerManager serverMgr = new ServerManager();

//Create website

Site mySite = serverMgr.Sites.Add("HelloWorld",@"C:\inetpub\wwwroot\HelloWorld", 9292);

//Create application pool

serverMgr.ApplicationPools.Add("HelloWorld");

//Create application

mySite.Applications.Add("HelloWorldApplication");

//assign application pool to site

mySite.Applications["HelloWorldApplication"].ApplicationPoolName = "HelloWorld";

mySite.ServerAutoStart = true;

serverMgr.CommitChanges();

more to follow....

Friday, January 08, 2010

Visual Studio 2010 beta and .NET 4.0 Framework

.NET 4.0 Framework Visual Studio 2010

Usefull links

Microsoft SharePoint 2010

Miscellaneous

New Year's Resolution - 2010

I've following technologies in mind to focus in 2010
  • Microsoft SharePoint Server 2010
  • Powershell
  • WPF Development
  • WCF Development

Friday, May 08, 2009

Random thinking....

Just a nice friday night me and Nas remembered our uni/collage time, gosh what time it was! I don't want to forget this time ever in my life....each time I go back I believe I'm still living in it. My plan is to put together a few pages for Graduation 2004 for all student of BSc. Hons.

Saturday, July 26, 2008

sadafshah.com redirected to here

This weekend I was wondering what to do and then this idea clicked my mind that ages ago I registered my domain with GoDaddy.com and never redirected it, for time being it will be directed to my this blog untill I put together my pages.

watch out this space for more.....

Thursday, March 22, 2007

Another day of life gone

Another busy day just came back from stockport where I had interview today, it was good. let see what happens.

Staffordshire Student Union election resutls are out now.

Shafqat Ali - President and we did it.

Ria Jacob - Communication Officer

Thursday, March 15, 2007

Stafford University Student Union Election 2007

Tommorow is result day let see who wins the election, I have been compaigning for Shafqat 'Shaf' for last three days and personelly believes that he should win.

Wednesday, February 22, 2006

Microsoft Research Cambridge

Well Well, the much awaited visit of MSR is over I was quite enthusiatic intially that I will be visiting different department with in MSR and will try to get some sort of idea how they are working and collaborating, specially sendon one.

We left crown plaza hotel around 8:30 and reached MSR about ninish. Ian welcomed us after having a quick cup of tea we been notified for moving to a massive presentation hall. first session was taken by MD Microsoft Research Cambridge. ....

Story of programmer

Story of programmer
 Posted by Picasa