Muqeet's blog

  • How many IIS 7 Managers are there anyways?

    A few days back I was having a conversation with an exchange admin on how exchange works with IIS and stuff like that when suddenly he said: "It's good that we can have IIS 7 on Windows Server 2003 now" and I went like HUH!!! After explaining him that there is no downgrade available for IIS and the changes from IIS 6 to IIS 7 and a lot more explaination it was starting to get frustating. The guy just kept on saying "But I have IIS 7 running on my Server 2003 machine". I had to finally convince him to show me the machine.

      After logging on the server he opens up IIS 7 Manager gives an IIS server name and connects. I explained him that the exe he was using was known as IIS Manager for Remote Administration. Now he lost me! To be honest there really are quite a few UI's for managing IIS 7.x. But isn't it great! Here's the list :-)

    1.) IIS Manager: This is the standard IIS Manager that is installed when you install IIS on a Server or Client OS running Windows Vista and up.


    2.) IIS 6.0 Manager: Confused? This one is installed when you install IIS 6 Management Compatibility feature within the Web server Role. Best example for this one is when you install SMTP feature in Windows Server 2008. It looks exactly like the IIS 6 manager... Except it will not show you the IIS Websites and Application pool settings as it use to show in Windows Server 2003. It will only show you SMTP.


     















    3.) IIS Manager for Remote Administration: This is a good one. This is basically a extension that is available as a download. It's a cool thing because I seen that a lot of ppl have IIS installed just because they wanted to connected to another server in their network or on the internet. Now with IIS Remote Manager you no more need to do that. You can just install this on your machine, make a few changes on the IIS Server and you are good to go. Here are the changes that you need to do.

    i.) Log into your IIS Server. Open up the IIS Manager on the server.
    ii.) At the Server node, in the features view find Management Service. Double Click.
    iii.) Select Enable Remote Connections and go through the connection settings. Default settings should do just good. Unless you really want to do something out-of-world :)

    Note: If you do not see management service in the features view. Check if you have it installed on the server at the first place. It will be under the IIS Management Tools section of IIS Features.

    Oh! By the way if you are looking into more detailed explaination on the IIS 6 vs IIS 7 UI. Check out some good set of articles from Nitasha Verma.

    Hope this solves some questions! Have Fun!

  • Netcraft: IIS now serves 50 Million Hostnames!

    I was going through some data on IIS webservers today and came across Netcraft, which is a website that gives monthly statistical data on webservers from different companies and some other interesting stuff. Not sure if this data can be taken official or not but what really excited me was the number of hostnames that were running on IIS.

    Microsoft Web Server has hit the BIG number of 50 Million hostnames from which Netcraft has recieved response. Now, yes, I know what you must be thinking. We all have Intranet websites that run any of the web server technologies that might be listed out there. Those are not coming into account in this. A reason that could be considerate enough not to get this data on a sales pitch ... :)

    Nevertheless, 50 Million hostnames is a huge number for anyone.

    Source: Netcraft February WebServer Survey

    Just to keep in spirit of this achievement I am now planning some informative articles on the latest and most powerful extensions that can be plugged in IIS 7.x

    Have Fun!

    PS: If any one can get me a link to an official statistical data for IIS, I would be more than happy to link to it.

  • IIS Solution Center and More

    Apparently a lot of people including me regularly search for support articles related to IIS for solutions. Today with no real work on hand I decided to save a few IIS related articles so that I can have a database at a central location. When I visited the Microsoft Support Solution center for IIS, I realised that a great location was already available with all the information. Solution Center as the name suggest is a central repository of not just the support articles but also a lot of great "How-To" articles on IIS. For some reason, I was not able to find the link for IIS 7 Solution Center, but below are the links for IIS 5, IIS 5.1 and IIS 6.

    IIS 6 Solution Center
    IIS 5, 5.1 Solution Center

    At the bottom of the IIS 5 Solution center you will find a link for Information on the "Nimda" worm. Hmmm... Not sure if that gives correct information but it sure as hell reminds you of the mark it left... :)

    For learning all the new stuff on IIS 7 ... do visit http://learn.iis.net/ and for questions: http://forums.iis.net/

    Hope this helps.

  • ASP.NET MVC Framework and IIS: What's the connection?

    "Can you tell me as to how ASP.NET MVC is processed in IIS?" I came across this interesting question from a member of my audience when I was giving a session for Community Techdays a few days back. I am not much of an ASP.NET developer therefore as much as I would hate to I had to say "Let me get back to you later on that".

    So here's what I have figured out so far:

    ASP.Net MVC or ASP.Net Model View Controller was introduced with .Net 3.5. The basic difference between an ASP.Net application and and ASP.Net MVC is that in ASP.Net, traditionally, the .Net framework maps the URL to a certain file on the disk (This file on disk has the code, that performs certain logic and also the markup to which is then sent to the requestor), whereas in ASP.NET MVC the URL is mapped to a controller where the controller class is responsible for handling various features of the request.

    The mapping of these ASP.NET MVC URL's is handled by the ASP.NET routing engine. I am not going to go into how the MVC is executed. But for further details you can check this.

    Lets look at it from an IIS perspective now. ASP.NET is executed in different ways in different versions of IIS. I will be covering IIS 6, IIS 7 and IIS 7 ... Yes I mention IIS 7 twice ... :) the 1st one is for IIS 7 with Integrated Pipeline mode and the 2nd one is for IIS 7 in Classic Mode. To know more IIS 7 processing features check my previous articles IIS : Changes from 6 to 7, IIS 6 and IIS 7 - How different are they?

    In IIS 6 and IIS 7 Classic Mode, ASP.NET processing is not built-in with IIS. In very simple terms when IIS determines that the request is for ASP.NET, the request is mapped to aspnet_isapi.dll and from this point on the request is executed and the response is sent back. Therefore, an extension has a lot of importance in terms of IIS 6. Hence, for ASP.NET MVC applications to work we need to have a mechanism to map the ASP.NET MVC URL's to the aspnet_isapi.dll. This is acheived in one of the two ways mentioned below:

    1.) Create a wildcard mapping for the ASP.NET MVC Application website in the way shown below:

    (i) Right-click on the concerning website --> select Properties
    (ii) Select the Home Directory tab
    (iii) Click the Configuration button
    (iv) Select the Mappings tab
    (v) Click the Insert button
    (vi) Give the path to the aspnet_isapi.dll in the Executable field. It's under C:\Windows\Microsoft.NET\Framework\v2.0.50727\, C:\ being your System Drive.
    (vii) Uncheck the checkbox labeled Verify that file exists
    (viii) Click the OK button

    Note: If you see the configuration tab to be greyed out, that means your application is not mapped to an Application Pool. Click on the Create button just above it and in the drop down below select an appropriate application pool.
    After this is done you need to make an addition in the global.asax file in your application as below:
    routes.MapRoute("Root", "", new { controller = "Home", action = "Index", id = "" });
    2.) The second method is to register the .mvc extension using registermvc.wsf with IIS from the following directory, C:\Program Files\Microsoft ASP.NET\ASP.NET MVC\Scripts
    Once that is done, modify you RegisterRoutes function in global.asax as follows:
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.MapRoute("Default", "{controller}.mvc/{action}/{id}", new { action = "Index", id = "" });
    routes.MapRoute("Root", "", new { controller = "Home", action = "Index", id = "" } );

    Now your URL's should be as follows:
    {controller}.mvc/{action}/{id}
     /product.mvc/


    Hope this helps.

  • IIS Security: Semi-colons in URL

    IIS security guy Nazim Lala has just blogged about a IIS 6 security issue, related to the use of Semi-colon (;) in a URL. It's not much of an issue if your IIS 6 server is properly configured. Good example of how Best practices can make your day. For more technical info do read the blog and check your servers for anything like that. It's always good to double check than to suffer right...

    Have fun... Hopefully see you in new year!!!

    Update: Info also present on MSRC Team Blog

  • Why should I use Web Platform Installer?

    This is one question I have often heard from a lot of people. I had written about this a long time back and yet find it interesting enough to give it another shot.

    For those who are not aware... Web platform installer is a free tool from Microsoft which lets you download, install and configure tools and utilities under the Microsoft Web Platform umbrella. So that includes IIS, Web Tools and Extensions from Microsoft, Runtime Frameworks, Development tools (These are express editions ofcourse) and a lot of opensource frameworks and applications. More info at www.microsoft.com/web

    I recently had a demo for an event and wanted to ready a few VM's on which of course I had to get IIS and a few other tools up and running. Once the basic OS's were installed I downloaded, installed and configured IIS, PHP, Web Developer Express Edition, SQL Express Edition and a few open source apps on 4 different machines in a matter of 1\2 hour. Sounds real fast and cool huh!

    All I had to do was install web platform installer from http://www.microsoft.com/web/downloads/default.aspx on each of the machines, choose all that I wanted to and rest was taken care by WPI.

    Some advantages I found of using WPI are:

    1. I don't have to worry about dependencies.
    2. I don't have to worry about the IIS version. It works on IIS 6, IIS 7.
    3. If a certain IIS extension was made for IIS 7 then it doesn't show up when you are running Windows Server 2003.
    4. I don't need to know what are the latest IIS extensions from Microsoft. They are all mentioned in Web PI with their status (Beta, RC or Live Version).
    5. If a reboot is required then Web PI will come up automatically once you reboot and log in. This is cool because now it will continue from the place it left off.
    6. It does download and install simultaneously. Example: If you have selected 4 items to be installed, WPI will install the 1st item as soon as it is downloaded and start downloading the 2nd item simultaneously. Here again it is smart enough to go through the dependencies 1st and then to the actual item.
    7. User friendly.
    8. WPI has been successful in bringing a good mixture of both Microsoft and Non-Microsoft open source applications for us to take advantage off.
    If you haven't, try it today and see the advantages for yourself. I am now using it on every time basis for my demos and VM setup.

    Other than this you can now(in V2) install and configure media components and include a custom feed (Example: feed of your enterprise application) as well from WebPI. Kateryna from IIS Team has more info on that here and here.

    Note: For the people who have had hard time installing PHP on IIS 6 or IIS 7 you really should try it out through WEB PI. It feels like a walk in a park.

    Have Fun!

  • Where is the IIS Admin Service in IIS 7???

    Question:
    Hello, I am pretty new to IIS 7. I have just recently started working on IIS 7 test boxes at my office. I installed default IIS 7 and was very happy but I think I have missed something as I am not able to find the IIS Admin Service. However, my IIS box seems to be running fine. On my IIS 6 production box I can see the service and IIS 6 does not work at all without the IIS admin Service started. What am I missing?

    It might sound a little new to you but IIS Admin Service in not required in IIS 7 for as long as you are not using IIS Metabase compatibility feature or FTP 6 publishing services.

    The interesting fact is not that IIS can run without IIS admin service, but How ?:)

    This is where you need to understand what is the role of IIS Admin Service and why that is not required in IIS 7. For the basics lets start with what are services in general. Services are basically programs that run in the background performing core operating system functions usually without any required input from the user. IIS Admin Service is one such service where in the user doesn't have to do anything.

    Now coming to what IIS admin service does: IIS Admin service is responsible for managing the metabase (the configuration repository in IIS 5, 6). In IIS 6 metabase is in xml format and can be edited and read in plain text editors like Notepad. The service runs under inetinfo.exe and is governed by iisadmin.dll primarily. IIS admin service makes the metabase available to applications that are dependent on it including IIS core components as well.

    Having said that the implementation of IIS admin service is pretty much the same in IIS 7 except that the configuration of IIS 7 is no more dependent on the Metabase. IIS 7 still stores its configuration in xml format, however, the schema and the depth of configuration and granularity is entirely different from what it was in IIS 6. Therefore IIS metabase is no more required in IIS 7 and exists only for compatibility reasons that is if you wish to install the IIS 6 compatibility components of IIS 7. The configuration is now stored in administration.config and applicationHost.config files which is at c:\windows\system32\inetsrv\config\. If you are familiar with .Net configuration then this will seem like a welcome change to you. IIS 7 configuration can also be governed via web.config files within your apps. For more info on the new architecture model check my previous post.

    Hope this answers your question.

  • Troubleshooting: .Net 2.0 Setup requires .Net 4.0 Runtime

    I recently came across this problem when I was attempting to create a setup project for one of my applications... I say attempting because I am not a developer but I like to amuse myself sometimes with some code here and there... So I have Visual Studio 2010 Beta 2 installed on my Windows 7 which by the way ROCKS!

    I created the application.. I created the setup project ... fixed some minor issues and there... cleaned some code... and finally the build succeeds... and I have the application with me...

    I test it on my machine and everything goes smooth and I love it... Now here's the thing... I run it on my server which by the way is running Windows Server 2008 and I receive the lovely pop-up as shown below:

    I was very sure my projects were created with .Net Framework 2.0 in mind... I couldnt make out as to why it was asking for .Net 4.0? What I knew for sure was .Net 4 apps can be written with Visual Studio 2010. So it was time to open my code again... I check my code I check everything around to see if anything refers to .Net 4.0. Couldn't find any. I checked the properties of the helper project for the setup and it showed what I wanted to see:

    .Net Framework 2.0 ... I knew I was missing something... so I go back to my setup project and check it again ... this time a bit more carefully and in consultation with some one (Harish Ranganathan)who has far more experience than me in writing code... and pretty soon enough we get to the Detected Dependencies view in the Setup Project which had .Net Framework as a dependency...I had seen that previously... Never cared much about it thinking that my project indeed needed the .Net Framework to work... What I had missed was the generalization...

    Yes my project needed .Net 2.0 framework but that never explains the same generalization is going to be applied by VS 2010 now... is it?

    That question was answered by the properties windows when checked for .Net dependency. Take a look:

    My mistake couldnt be shown more clearly than this... :) Once I changed that to .Net Framework 2 everything's good...

    Hope this helps...

  • Virtual Tech Days: November 11-13 2009

    I gave a session on IIS 7.5 for developers in the recently concluded Virtual Tech Days ... It was good to see the amount of participation and enthusiasm people had with every session being conducted.

    Virtual Tech Days is an online event where in every session is delivered on Live Meeting. These sessions are based on latest technology offerings from Microsoft, driven by various evangelists and product team members. Virtual Tech Days as the name suggests are completely technology driven and hence one can expect rich demos show casing examples related to the latest technologies...

    My session was part of the Web Platform sessions lined up over a period of 3 days. I basically focused on architectural changes from previous IIS versions to IIS 7.5. Moving on we discussed the ASP.Net processing model and then discovering WEB PI and a few IIS extensions.

    Later on, I briefly introduced the 2 managed code API's (MWA & MWM) to the audience for web development. I had a pleasure of a solid Q&A session for 15-20 mins which was very exciting to me.

    Virtual Tech days is held almost bi-monthly these days and information can be obtained from www.virtualtechdays.com