Muqeet's blog
-
Troubleshooting: Silverlight and IIS 6
If you have noticed Silverlight and IIS 6 do not go well by default. When we come to think of it, din't Silverlight come a long time after Windows Server 2003? Yes, but that doesn't mean that they do not support each other totally. It's just that the MIME types needed to run Silverlight are not present by default on IIS 6. So here's how to do add them:
--> Open up IIS manager
--> Right-click Server Name
--> Properties
--> Mime Types
--> New
and add the following 3 entires one after the other:
Extension : .xap Mime Type: application/x-silverlight-app
Extension: .xaml Mime Type: application/xaml+xml
Extension: .xbap Mime Type: application/x-ms-xbap
Once done with this, you should be good to go ...
Oh by the way, you would have to do the same if you are still running the RTM version of Vista (IIS 7). From Vista SP1 onwards this was taken care by default. More info at iis.net
Have Fun! -
IIS : Changes from 6 to 7
A few days back I was talking to a few Sys Admins and they asked me something, which I din’t get quite right at first attempt. Well the question was simple. We are planning to move from IIS 6 to IIS 7, could you let us know what are the differences? I told them all about how the new architecture came into place and how that benefits us. When I finally finished my talk. I realized they never wanted me to get into architecture. Their question was simple, Could you let us know what are the differences in IIS 6 and IIS 7 (As System Admins)?
That is when I understood as system administrators, knowing about the changes of the IIS 7 architecture is just the first step to understand the changes. Those of you who are still unaware of the architectural changes you might want to check the post I wrote some time back. However, this post will attempt to bring together the changes in IIS 7 with respect to IIS Installation, Configuration, Security, IIS Manager and so on.Note: The description is brief intended only to highlight the changes.
IIS Installation:
How is it different with IIS 6 installation? Well it’s not different it’s just more customizable. IIS 7 is broken down into more than 40 modules, which, can be selected depending on the configuration you want for your server. If there is a dependency for a particular module, that will be auto-selected by the setup process. Within Windows Vista IIS 7 can be installed from Turn windows Features on\off from the control panel and from Windows Server 2008 you can install the Web Server Role through the Server Manager.
IIS Configuration System:
The configuration system within IIS 7 has evolved from the flat property description as in IIS 6 to a much structured and easier to understand. IIS 6 used Metabase.xml file within %windir%\system32\inetsrv as its configuration store. IIS 6 Metabase compatibility has been maintained but focus should be paid on the new configuration as the changes it brings can really help you get going quickly. If you are familiar with the .Net configuration system then understanding the new IIS configuration will be much easier. The new files that you should be aware of regarding IIS configuration are:
At the root (or global) level, there are two separate files:
· system32\inetsrv\applicationHost.config: Holds the global defaults for web server (IIS) settings.
· \windows\microsoft.net\framework\v2.0.50727\config\machine.config: Holds the global defaults for the .NET framework settings, including some of the ASP.NET ones (the rest of them are in the web.config at the same folder, which is sometimes called the root web.config)
Apart from this, in the web content directories, there may be optional web.config files. These can be used to control the features for their level and downwards.
Security:
IIS 6 is known for it's by default lockdown and it has done wonders for a lot of system administrators. In regard to IIS 7 a lot of changes in the security model of the web server is in direct relation to the changes of it's core architecture itself. In IIS 6, security was performed in a dual-mode when dealing with ASP. Thanks to the new integrated pipeline structure within IIS 7, authentication and authorisation is taken up just once. For a clear understanding you could refer my previous post on IIS 7 architecture.
Additionally, IIS 7 brings in the new feature of Delegated Administration. Using delegated administration you could allow changes of certain levels to non-admin users. To top it, these users could be both Windows and non-Windows (local IIS users). For example, you could now make a user, administrator for a particular web server or website. This user does not have to be the administrator of the box. How cool is that for a change!
All previous forms of Authentication schemes are support on IIS 7 with Passport Authentication being the only exception. For details on how security schemes have changed in IIS 7 read the article on IIS.Net
IIS Manager:
IIS manager is be far my favorite change in IIS 7 not that I dint like it's IIS 6 UI but this is much cooler and user friendly. IIS manager has been built into it's familiar tree view on the left hand corner. The center pane can now be used to see what is know as the "content view" and the "features view". Content view shows you the content that the selected application or the virtual directory holds and the feautres view shows the available features for that selected virtual directory. And at the right hand corner you would find this very helpful set of commands available for the selected attribute.
This was just to get you started. Hope this helps! -
I am Back!
It's been long time I haven't been around. I was really busy with my current profile (interesting work you see!). Meanwhile lot of developement has taken place in the community around - new version with Win7 beta, lots of new extensions, lots of issues resolved. I will be covering more of this in the near future. But just to pump ourselves into momentum, I have collected few IIS Kb's that are interesting. Take a look at them.
Note: These are just part of my collection so they are pretty much related to IIS 5.0,5.1,6.0,7.0
Hope it helps:
321141 How To Disable or Remove Unnecessary IIS Services
309506 How To Perform an Unattended Installation of IIS 6.0
950573 FIX: Application domains restart unexpectedly in Internet Information Services 7.0
954874 IIS binds to all IP addresses on a server when you install IIS 7.0 on Windows Server 2008
954872 How to create and manage configuration backups in Internet Information Services 7.0
954756 You experience issues when you host a Web application that contains lots of ASP files in IIS
954857 The Windows Process Activation Service and the World Wide Web Publishing Service are set to a Stopped state after you install the .NET Framework 3.5 on a Windows Vista-based computer
954873 You may experience slow performance when you use Integrated Windows authentication together with the Kerberos authentication protocol in IIS 7.0
954847 IIS 6.0 returns path information that is incorrect when you use the WebDAV PROPFIND method
954755 How to configure intermediate certificates on a computer that is running IIS for server authentication
954856 BUG: You cannot install or uninstall a component in IIS 7.0
954875 An error message is displayed when you try to create a new application pool in Internet Information Services 7.0
954839 Events 4505 and 4506 are logged in the Security log when you turn on the metabase auditing feature in Internet Information Services 6.0
954841 Error message when you browse IIS 6.0 content in Internet Explorer: "The data is invalid"
941850 When you try to access files on a WebDAV site that uses only Digest authentication, the process may fail on a Windows Vista-based computer
942039 FIX: Visual Studio 2005 incorrectly creates a subfolder and moves a Web project to the newly created folder -
How To: IIS and Log Parser 2.2
As IIS administrators we come across many scenarios wherein we are asked to analyse the overall performance of a web server. There are various steps involved in it, however, analysing IIS log files without a proper tool can be a pain. It's very easy to get lost in the lines. Log Parser is a tool that I rely upon when it comes to manual IIS log file analysis. It's a cool tool that provides universal query access to text-based data, such as .log files. Log Parser can be downloaded from here.
-
How To: Silverlight Tools Offline Installation
The first time I tried to install Silverlight Tools RTW I wasn't really prepared for what was coming - My silverlight tools installation had just failed. Had no idea as to why that had happened, but after some wandering around the subject I found out, Silverlight tools for Visual Studio requires a running internet connection as it downloads components during the 1st phase of the installation procedure.
I had to figure out a way to get the installation done on my development machine which unfortunately doesn't have internet connection to it. So here's how to install Silverlight tools offline if you are in a situation like mine...
Get to a system that has internet connection and go into the directory where you have saved the Silverlight_Tools.exe and run the following command.
Silverlight_Tools.exe /createlayout
This will extract all the files and save it within the folder you specified... After that is done double-click SPInstaller.exe from the extracted files directory and that's it we are good to go ....
Another advantage of running this is, now you can copy this folder and use it to install silverlight tools on your other machines that dont have internet connection as well.
There are some other ways of performing the installation offline like downloading the individual components separately and then storing them in the %temp% directory and then run the silverlight_tools.exe ... But I find the first method far easier... Actually I am not entirely sure if you need to store it within the %temp% folder at the first place... so why take chances :-)
Hope this helps... -
Microsoft Web Platform Installer RC now out!
Nutshell: Microsoft Web Platform Installer is a great tool to have.
You may ask, Why? Well, for the readers who are not yet aware of Web PI, it installs and updates all of Microsoft's web platform packages from a single interface. With the release of Windows Vista and Windows Server 2008, we have seen great enhancements in Microsoft's web offerings and it thus became a bit tedious to co-ordinate between the developer and an Admins choice of install. Well if you are into managing such a scenario, you will discover Web PI can save ample amount of time. However, there was a gotcha when I used it the first time around. It dint work on any versions of Windows prior to Windows Vista. If you are from a location near me you might already know that the practical use of such an offering would not be anytime soon. However, seems like Microsoft has heard our inputs and they have given us just what we wanted...
Bil Staples, a couple days back announced the availability of Microsoft Web Platform RC version which by the way now supports Windows XP and Windows Server 2003. Now isn't that cool. Not very often do we see requests become a solution at such a quick pace.
However, something that seemed cool to me is the variety of options and flexibility this tool brings with it. All you need to do is install the roughly 600Kb file (Yeah! it's just that small.) and select the options you like and that's it. The installer will download and install them for you...
Web PI will take care of giving you the options that suit your Operating system version. For example, if you are on Windows Vista then you will get the option of IIS 7 and if on Windows Server 2003 then you will get the option of IIS6. Sames goes for Windows Xp wherein you will get the option of IIS 5.1.
If you are a beginner on Web platforms then this is the best way to hit it off. Oh Yes! just one more thing... you need admin privileges to use Web PI and need to have the .Net 2.0 framework running... check it out... -
How To: AppCMD in IIS 7 - An Introduction
AppCMD is the main command line utility for managing IIS 7 within Windows Vista and Windows Sever 2008...I have felt navigating through AppCMD is easier than ADSUTIL.vbs (its predecessor) but here's an entry nevertheless for the beginners.
Below are a few basic commands and tips to get you started.
AppCMD is found in %windir%/system32/inetsrv. You will need to run the command prompt with elevated priviliges to access this command line utility.
Appcmd /? - This will give you the help for the utility
Appcmd list sites - This will list all the sites on the sever along with their ID, Bindings and State.
Appcmd list config -section:? - This will list all the available section names
Appcmd list config "Default web site" - This will list the entire configuration of the "Default Web Site"
Appcmd list wp - This will list all the worker processess running at the system.
Appcmd start site "Default Web site" - This will start the Default Website
Appcmd stop site "Default Web site" - This will stop the Default Website
Appcmd list appPool - This will give you information of the running Application pools on your machine along with their managed version, managed mode and state.
Scenario 1: I would like to find out the default document for my default website and add a new document named sample.htm in it.
The scenario is simply 2 questions, therefore run the following 2 commands to achieve the result.Appcmd list config "Default Web Site"-section:defaultDocument
The above command will add the file sample.htm at the end of the default document list. You might run the 1st command once again to verify that the document has been added to the list.
Appcmd set config "Default Web Site"-section:defaultDocument /+files.[@end,value='sample.html']
Scenario 2: I want to collect the configuration of my default web site in a separate file named configuration.txt and place it in d:\
Here's the command for that:Appcmd list config "Default Web Site" >d:\configuration.txt
Just to verify try this:
notepad d:\configuration.txt - This shall bring up a notepad showing you the configuration of your Default Web Site.
Scenario 3: I want to find the current requests being served by the Default App Pool.
You will need to put in this command to get the required information:Appcmd list requests /apppool.name:DefaultAppPool
The rest I leave for you to try out! Have fun ... -
IIS 7 Feature Delegation
IIS 7 has come with some very cool features; be it the cool new UI, which has got the right information at the correct places or the integrated pipeline architecture of the core webserver itself of which I have spoken earlier.However, one feature that will help every IIS admin out there is Feature Delegation. If you are in a web hosting scenario or you maintain a web infrastructure for large corporations then this one's for you.
Feature delegation is a method to delegate certain features within IIS to the non-admins or simply a dev team. For instance, on a developement box, if you do not want to control the error pages then you could delegate the module to the development team. However, error pages are not the only module that you can delegate. You can give control for a wide variety of modules depending on your environment and your planning.
Feature delegation is decided at the server level and the rules are followed at all the lower levels. IIS manager permissions (which I see as a sub-set to feature delegation) is given at Site and Application Level. This together, gives us, IIS admins, the much needed flexibility to give away the right priviliges to the concerned people.
Feature Delegation is present on both Windows Vista and Windows server 2008, but, IIS manager permissions is present only on Windows Server 2008.
The video below will give you a brief explaination of how that can be done. Have fun!
Let me know if you need more info... -
How To: StatusCheck
Just finished writing a very simple IIS 7 UI ModulePage that will enable us to view the meaning of the status and sub-status codes from within the IIS Manager UI. Here's a documentation to get you started. Just follow the document, there isn't much that you need to do to get it working ....
Overview and Features:- StatusCheck is a simple IIS 7 UI Module page which adds a module page to the existing feature set of IIS 7.
- StatusCheck allows you to see the meaning and description of almost all the Status and Sub-status codes within IIS.
- No more need to remember the meanings of Status Codes.
- Helps us get a better understanding for IIS logs.
- Follow this URL to get the DLL. http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1732
- Once done with this, we will need to move this DLL into GAC. To do that, simply drag and drop the StatusCheck.dll into the %windir%\assembly folder from windows explorer.
- After that, we need to make a couple of changes in the administration.config located in system32\inetsrv\config\ folder.
- Open the file using notepad and locate the moduleProviders section. Go to the end of this section and add the following code:
add name="StatusCheck" type="StatusCheck.StatusCheckModuleProvider, StatusCheck, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d320594c4a66065"
With the <> tags inclusive. PublicKeyToken can be verified by right-clicking the assembly in the GAC.- Now, search for "modules" and add the following line at the end of the section.
add name="StatusCheck"
Again inclusive of <> tags at the beginning and at the end respectively. Save the file and exit out of it.
That's it ... nothing else left to do ... other than to check if it is working :)
For that open up the IIS Manager, and you should see the following listed in the features view for websites.
To start using the module just double-click on the icon that says StatusCheck. That should take you to a page that is similar to this.
To start using, just select the status and substatus code from the drop down box and click Get Details.
Summary:
We have understood how to use StatusCheck from within IIS manager.
I am soon going to come out with an equivalent program using .Net 2.0 which can be used on Windows XP, Windows Server 2003, Windows Vista and Windows Server 2008. What I mean it is going to be independent of IIS.
Let me know if you face any difficulties... Have Fun!
Update:
Fortunately, it din't take a long time for me to write the application. So here it is ...
http://rapidshare.com/files/150137192/StatusCheck.exe.html
and this is how it will look like
I have tested the application on Windows Vista SP1, Windows Server 2008, Windows Server 2003 SP2 and Windows XP SP2. All it needs is .Net 2.0.
As you can observe from the above pictures I have the same windows form feature set in the application as well as the IIS 7 Module Page. This goes on to show the level of extensibility IIS 7 brings with itself. -
How To:Import, Export Bookmarks in IE and Firefox
I have always had this bad habit of juggling around different browsers from time to time and one thing that I never even tried to do was to sync my bookmarks. Comes very handy when you read a lot on the net. Often I stop in the middle of a page and say "Well, I will read it later" and usually forget to get back to the page ever again.
Try using the import/export option available both under Internet Explorer (IE) as well as from Firefox. Both these can be exported in HTML formatted and imported in the same way.
If you are using Internet Explorer (IE) then here's how to do it :
Go To File -> Import and Export -> Next -> Import/Export Favorites -> Get to the location -> Select the location in your bookmarks toolbar -> Next and finish.
If you are using Mozilla Firefox then here's how to do it:
Bookmarks -> Manage Bookmarks -> Bookmarks Manager -> File -> Chose Import or export and follow the on-screen instruction.
Exporting your bookmarks and keeping a copy of it really helps when you are usually moving from one system to another all the time. It has definitely helped me! Make use of it. Also make sure when you are exporting the bookmarks you are saving it in HTML format. Have fun.