| The Official Microsoft IIS Site |
|---|
| Roku releases support for Smooth Streaming At NAB 2012 in April, we announced an initial list of partners that licensed Smooth Streaming Client Porting Kit (link). Today, Roku announced that the support for Smooth Streaming is publicly available for Roku 2, Roku LT and Roku HD devices with version Roku software version 4.7. This update will be pushed to these devices in next 48 hours. You can get more details on their blog. Congratulations to the team at Roku for this release. We are very excited to see the release. |
| Introducing Testing Domain - localtest.me Save this URL, memorize it, write it on a sticky note, tweet it, tell your colleagues about it! localtest.me ( http://localtest.me ) and *.localtest.me ( http://something.localtest.me ) If you do any testing on your local system you’ve probably Read More......(read more) |
| FreeBSD to run as a first-class guest on Windows Server Hyper-V Today, at BSDCan 2012 , Microsoft and partners NetApp and Citrix announced upcoming native support for FreeBSD support on Windows Server Hyper-V. This move continues our commitment to extend support across platforms to the Windows Server Hyper-V solution, making it easier for more customers to realize the benefits of server virtualization and more easily adopt cloud computing. This will allow FreeBSD to run as a first-class guest on Windows Server Hyper-V . The drivers and associated source code...(read more) |
| URL Scan or Request Filtering in IIS7 URL Scan has been a useful tool since Windows Server 2003, and continues to be used on many web server deployments. Did you know though that IIS7 includes a feature named Request Filtering that handles the same functionality as URL … Read more »...(read more) |
| Application Initialization Part 2 In my last post, I gave a bit of background on the Application Warm-Up module, now called Application Initialization. This week, I would like to go into more detail as to what the Application Initialization module does, and how you should think about using it. As I mentioned earlier, the idea behind Application Initialization is that we want to provide a way that IIS can prepare an application to serve requests without having to wait for an actual client to make a request. With Application Initialization, we break the problem down into 3 parts:
I would like to address the first two questions here. The third question is a bit more complex and I will save it for my next post. Starting a worker process without waiting for a requestThis is something that's not strictly speaking a part of Application Initialization in that we added this capability as a built-in feature of IIS, starting with IIS 7.5. I will go over it here because it works hand in hand with Application Initialization to make the application available as soon as possible after starting IIS. This feature is controlled by a the startMode property for the application pool, described (along with other application pool properties) here. The default value for startMode is OnDemand, which means that IIS will not spin up any worker processes until needed to satisfy a client request. If you set it to alwaysRunning, IIS will ensure that a worker process is always running for the application pool. This means that IIS will spin up a worker process when the World Wide Web Service is started, and it will start a new worker process if the existing one is terminated. Note that this property should not be confused with the autoStart property. Understanding autoStart requires a bit of background knowledge. Both application pools and worker processes can be started and stopped. If an application pool is started, it means that IIS will accept requests for URLs within the pool, but it does not necessarily mean that there are any worker processes started. If an application pool is stopped, IIS will return a "503 Service Unavailable" for any requests to the application pool and it will not start any worker processes. The autoStart property is essentially a flag that IIS uses to know which application pools should be started when the World Wide Web Service is started. When you stop an application pool in IIS Manager, autoStart is set to false. When you start an application pool, autoStart is set to true. In this way, IIS ensures that the same set of application pools are running after the World Wide Web Service is started and stopped (or through a machine reboot.) Now let's take a quick look at the configuration for an application pool that is set to be always available. This application pool will start when the World Wide Web Service starts and it will immediately spin up a worker process. <system.applicationHost> With this configuration, the Default Application Pool will immediately spin up a worker process when IIS is started, and it will spin up a new worker process when the existing one exits. With IIS 7.5, this property was not exposed in IIS Manager. It can be set by editing the applicationhost.config file directly or by one of IIS's scripting or programming APIs, or by the Configuration Editor UI tool. In IIS 8, we have added the startMode property to the advanced properties page for the application pools UI. How can I get the worker process to load my application without waiting for a request?Now that you can see how to get IIS to spin up a worker process without waiting for a request, the next thing to address is how to get an application loaded within that worker process without waiting for a request. The Application Initialization module provides a solution here, and as above, it is controlled by a single configuration property. The Application Initialization module extends the IIS configuration by adding a new property to the application settings called preloadEnabled (in IIS 8, this property is built-in.) Let's take a look at what this looks like in the configuration where I've added a new application to the default web site and enabled it for preload: <system.applicationHost> Here's how Application Initialization uses this property. When a new worker process spins up, Application Initialization will enumerate all of the applications that it will host and checks for this property. For any application where preloadEnabled="true", it will build a URL corresponding to the default page for the application and run it through the pipeline. This request does not go through the network, and there is no client listening for a response (IIS discards any data that would have gone to the client.) This "fake" request accomplishes a few key things. First, it goes through the IIS pipeline and kicks off an application start event. This initializes a number of parts inside of IIS, and if the request is for ASP.NET, it will cause global.asax to run. It also reaches the application, which will see it is the first request after starting. Typically, I expect that applications will just handle this request just like any other request from a real client, but we do set some server variables into our "fake" request, so an application with awareness of this feature could implement special processing if it chose to do so. There is another important aspect to this process. When IIS spins up a new worker process, there is two way communication between WAS and the new process. This allows WAS to know precisely when the worker process is ready to accept new requests. It also allows the worker process to get information from WAS as to whether it is going to be a new process to start taking requests, or whether it's a replacement process to take over for an older process that's being recycled. This is an important distinction. In the case of a new worker process, we want to start taking client requests as soon as possible, which is the way that things work outside of Application Initialization. In the case of a replacement process, though, Application Initialization will prevent the new process from reporting itself ready for new requests, until all of the preload requests (and any warumup requests, which I will discuss later) have completed. This means that no client will ever have to wait for a process recycle to complete - because the old process will continue to take requests until the new one has completed all application initialization. In my experience, many applications with a slow startup will do their work even for a simple request to the default page. For such applications, you can take advantage of improved application recycling simply by setting preloadEnabled="true" for that application. Similar to the startMode property above, IIS 7.5 requires you to make this setting via direct edits or applicationhost.config, or via scripting or one of our config APIs, or via the Configuration Editor UI tool. In IIS 8, we have added "Enable Preload" as a checkbox in the UI for application settings. Next time...The two topics that I've covered here should get you started with Application Initialization. The ability to handle worker process recycles has been a highly requested feature. In my next post, I'll tackle the topic of what it means to initialize an application and what things an application developer can do to make things responsive during the time everything is warming up. This is where we've made major changes and added a lot of stuff since the original beta release. |
| Windows Server 2012, IIS8, ASP.NET 3.5 and issue installing behind firewall (without internet) I’ve been starting to become familiar with Windows Server 2012 (aka Win8). I’ve been a server “guy” for several years and when new versions come out, especially with another version of IIS. My interest is peaked to evaluate new features. This blog post is about a recent issue that alters a bit how we install the .NET 3.5 framework. A little history, when .NET 1.0 came out, it was a stand-alone runtime that would install on Windows 2000. When Windows Server 2003, .NET 1.1 was part of the OS and you...(read more) |
| Here’s to the first release from MS Open Tech: Redis on Windows The past few weeks have been very busy in our offices as we announced the creation of Microsoft Open Technologies, Inc . Now that the dust has settled it’s time for us to resume our regular cadence in releasing code, and we are happy to share with you the very first deliverable from our new company: a new and significant iteration of our work on Redis on Windows, the open-source, networked, in-memory, key-value data store. The major improvements in this latest version involve the process of...(read more) |
| More news from MS Open Tech: announcing the open source Metro style theme for jQuery Mobile Starting today, the Metro style theme for JQuery Mobile , the popular open source mobile user interface framework, is available for download on GitHub and can be used as a NuGet package in Visual Studio . The theme enables HTML5 pages to adapt automatically to the Metro design style when rendered on Windows Phone 7.5. The Metro style theme is open source and available for download here . This new Metro style theme’s development was sponsored by Microsoft Open Technologies, Inc. working closely...(read more) |
| Configuring FTP Client Certificate Authentication in FTP 7 We had a customer question the other day about configuring FTP Client Certificate Authentication in FTP 7.0 and in FTP 7.5. It had been a while since the last time that I had configured those settings on an FTP server, so I thought that it would be great to re-familiarize myself with that feature. To my initial dismay, it was a little more difficult than I had remembered, because there are a lot of parts to be configured. That being said, there are a few primary activities that you need to know about and configure correctly: I will explain each of those in this blog, although I will defer some of the details for Active Directory mapping to an excellent blog series that I discovered by Vivek Kumbhar. Configuring the FTP ServiceThere are several settings that you need to configure for the FTP server; unfortunately there is no user interface for those settings, so you might want to familiarize yourself with the following settings:
At first I had made a batch file that was configuring these settings by using AppCmd, but I eventually abandoned that script and wrote the following VBScript code to configure all of the settings at one time - the only parts that you need to change is your site name and the hash value your SSL certificate, which are highlighted in yellow: Set adminManager = CreateObject("Microsoft.ApplicationHost.WritableAdminManager") adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST" Set sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST") Set sitesCollection = sitesSection.Collection siteElementPos = FindElement(sitesCollection, "site", Array("name", "ftp.contoso.com")) If (addElementPos = -1) Then WScript.Echo "Element not found!" WScript.Quit End If Set siteElement = sitesCollection.Item(siteElementPos) Set ftpServerElement = siteElement.ChildElements.Item("ftpServer") Set securityElement = ftpServerElement.ChildElements.Item("security") Set sslClientCertificatesElement = securityElement.ChildElements.Item("sslClientCertificates") sslClientCertificatesElement.Properties.Item("clientCertificatePolicy").Value = "CertRequire" sslClientCertificatesElement.Properties.Item("useActiveDirectoryMapping").Value = True Set authenticationElement = securityElement.ChildElements.Item("authentication") Set clientCertAuthenticationElement = authenticationElement.ChildElements.Item("clientCertAuthentication") clientCertAuthenticationElement.Properties.Item("enabled").Value = True Set sslElement = securityElement.ChildElements.Item("ssl") sslElement.Properties.Item("serverCertHash").Value = "57686f6120447564652c2049495320526f636b73" sslElement.Properties.Item("controlChannelPolicy").Value = "SslRequire" sslElement.Properties.Item("dataChannelPolicy").Value = "SslRequire" adminManager.CommitChanges Function FindElement(collection, elementTagName, valuesToMatch) For i = 0 To CInt(collection.Count) - 1 Set element = collection.Item(i) If element.Name = elementTagName Then matches = True For iVal = 0 To UBound(valuesToMatch) Step 2 Set property = element.GetPropertyByName(valuesToMatch(iVal)) value = property.Value If Not IsNull(value) Then value = CStr(value) End If If Not value = CStr(valuesToMatch(iVal + 1)) Then matches = False Exit For End If Next If matches Then Exit For End If End If Next If matches Then FindElement = i Else FindElement = -1 End If End Function Once you have configured your FTP settings, you should have an FTP site that resembles the following in your ApplicationHost.config file: <site name="ftp.contoso.com" id="2"> <application path="/"> <virtualDirectory path="/" physicalPath="c:\inetpub\ftproot" /> </application> <bindings> <binding protocol="ftp" bindingInformation="*:21:" /> </bindings> <ftpServer> <security> <ssl serverCertHash="57686f6120447564652c2049495320526f636b73" ssl128="false" controlChannelPolicy="SslRequire" dataChannelPolicy="SslRequire" /> <authentication> <basicAuthentication enabled="false" /> <anonymousAuthentication enabled="false" /> <clientCertAuthentication enabled="true" /> </authentication> <sslClientCertificates clientCertificatePolicy="CertRequire" useActiveDirectoryMapping="true" /> </security> </ftpServer> </site> More details about these settings can be found in the configuration reference articles that I mentioned in the beginning of this blog post, and additional information about configuring FTP over SSL can be found in the following walkthrough: Configuring Active Directory MappingThe next part of this process is kind of tricky; you need to accomplish all of the following:
That makes it all sound so easy, but it can be very tricky. That being said, as I mentioned earlier, as I was putting together my notes to write this blog, I stumbled across a great blog series by Vivek Kumbhar, where he goes into great detail when describing all of the steps to set up the Active Directory mapping. With that in mind, instead of trying to rewrite what Vivek has already documented, I will include links to his blog series:
I have to give Vivek full credit where it's due - he wrote a truly great blog series, and he included a lot more detail in his blog series than I had originally planned to include in this blog. (In my humble opinion, Vivek's blog series is the best documentation that I have seen for this feature.) Configuring your FTP ClientTo test out client certificates, I used both the SmartFTP GUI-based FTP client and the MOVEit-Freely command-line FTP client; both of which I discussed in my FTP Clients blog series some time ago. Using the SmartFTP ClientTo configure the SmartFTP client, I just needed to enable and specify the correct client certificate in the properties for my connection: Using the MOVEit-Freely FTP ClientFor the MOVEit-Freely FTP client, I just needed to specify the correct parameters on the command line: ftps.exe -z -e:on -pfxfile:administrator.pfx -pfxpw:"P@ssw0rd" -user:anonymous -password:"someone@contoso.com" The important settings are the Client RecapFor more information about these two FTP clients, see the following blog posts:
SummaryFTP client certificates are definitely a bit of a challenge to configure correctly, but it's not an impossible task to get this feature working. (Cross-posted from http://blogs.msdn.com/robert_mcmurray/) |
| NxtGenUG Manchester Slides Thanks to all the attendees who came to my talk on IIS8 last week at NxtGenUG Manchester Daresbury. Apologies for the delay in posting the slides, you can now get them on my Slides & Resources page and the direct link for the IIS 8 Presentation slides is - http://www.andrewwestgarth.co.uk/Presentations/IIS%208%20–%20Platform%20for%20the%20Future.pdf...(read more) |
| Orchard: Custom Content in Sub-Folders Orchard doesn’t seem to like anything in it’s web root except for it’s own content. Try it out – create a folder (I created /TestContent/) and then put a test from there (I created test.html) and try to access it. … Read more »...(read more) |
| Extensibility Updates in the FTP 8.0 Service A few years ago I wrote a blog that was titled "FTP 7.5 Service Extensibility References", in which I discussed the extensibility APIs that we added in FTP 7.5. Over the next couple of years I followed that initial blog with a series of walkthroughs on IIS.net and several related blog posts. Here are just a few examples:
In today's blog I'd like to discuss some of the extensibility features that we added in FTP 8.0, and show you how you can use those in your FTP providers. Custom FTP AuthorizationIn FTP 7.5 we provided interfaces for With that in mind, I wrote the following walkthrough on the IIS.net web site: The title pretty much says it all: the provider that I describe in that walkthrough will walk you through the steps that are required to create an FTP provider that provides custom user authentication, verification of role memberships, and authorization lookups on a per-path basis. Custom FTP Event HandlingIn FTP 7.5 if you wanted your provider to respond to specific user activity, the best way to do so was to implement the With that in mind, I wrote the following walkthrough on the IIS.net web site: Once again, the title says it all: the provider that I describe in that walkthrough will walk you through the steps that are required to create an FTP provider that prevents FTP clients from downloading more files per-session than you have allowed in your configuration settings. Happy coding! (Cross-posted from http://blogs.msdn.com/robert_mcmurray/) |
| Google and Geo-location, CNDs, DNS Load Balancing-Week 50 You can find this week’s video here . This week answers two Q&A questions from viewers. DNS Load Balancing and then some discussion and a walkthrough using Application Request Routing (ARR) for a Content Delivery Network (CDN). There’s a growing movement Read More......(read more) |
| Announcing Windows Azure Media Services and MPEG-DASH support This week at the annual National Association of Broadcasters (NAB) Show in Las Vegas we made two big announcements: “New cloud-based Windows Azure Media Services is designed to make creating, managing and delivering media to any device easier than ever by offering a comprehensive set of ready-to-use first- and third-party media technologies. [...] Taking advantage of the worldwide Windows Azure cloud infrastructure, Windows Azure Media Services gives content providers and media partners the...(read more) |
| Announcing Web Deploy 3.0 Release Candidate! We are happy to announce that we have just released the Release Candidate for Web Deploy 3.0. You can download the x86 or x64 versions. If you are new to Web Deploy, Please read our Introduction to Web Deploy tutorial. Currently Web Deploy RC is only available through direct download. We are still working on WebPI feed. Easiest way to install V3 RC is to first install Web Deploy V3 Beta using WebPI 4 beta (x86/x64) as instructed in Installing & Configuring Web Deploy tutorial, and later update it using RC setup. Web Deploy 3.0 beta will be upgrade to the RC version, and this V3 will continue to live side-by-side with Web Deploy 2.0 & Web Deploy 1.1. Here's a rundown of new features: 1. Publishing & Migration to IIS8
2. Automatic Backup
3. PowerShell Cmdlets
4. Improved parameterization
5. ApphostAuthOverride Provider
6. Others
|