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:

  • How can I start the worker process that hosts my application without waiting for a request?
  • How can I get the worker process to load my application without waiting for a request?
  • How can my application send some kind of response so that clients don't see the browser hang until the application is ready?

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 request

This 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> 
<applicationPools>
<add name="DefaultAppPool" autoStart="true" startMode="alwaysRunning" />
</applicationPools>
</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> 
<sites>
<site name="Default Web Site" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
</application>
<application name="AppInit" applicationPool="DefaultAppPool" preloadEnabled="true">
<virtualDirectory path="/AppInit" physicalPath="c:\inetpub\wwwroot\appinit" />
</application>
</site>
</sites>
</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 Service

There 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 Mapping

The next part of this process is kind of tricky; you need to accomplish all of the following:

  • Obtain and install a client certificate on the system where your FTP client is installed. Hare some additional notes to consider:
    • This may involve setting up your client system to trust the CA that issued your client certificate.
    • This may also involve setting up your FTP server to trust the CA that issued both your client certificate and the server certificate that you are using for your FTP site.
  • Configure Active Directory to map the client certificate to an Active Directory account.
  • Configure your FTP client to use a client certificate when connecting to your FTP server.

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 Client

To 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 Client

To 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 Client

For 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 pfxfile and pfxpw values, where pfxfile is the name of the PFX file that holds your client certificate, and pfxpw is the password for the PFX file. (The username and password values will be ignored for the most part, because you will actually be logged in through your client certificate, so you can leave those as anonymous.)

Client Recap

For more information about these two FTP clients, see the following blog posts:

Summary

FTP 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 Authorization

In FTP 7.5 we provided interfaces for IFtpAuthenticationProvider and IFtpRoleProvider, which respectively allowed developers to create FTP providers that performed user and role lookups. In FTP 8.0 we added a logical extension to that API set with IFtpAuthorizationProvider interface, which allows developers to create FTP providers that perform authorization tasks.

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 Handling

In FTP 7.5 if you wanted your provider to respond to specific user activity, the best way to do so was to implement the IFtpLogProvider.Log() interface and use that to provide a form of pseudo-event handling. In FTP 8.0 we add two event handling interfaces, IFtpPreprocessProvider and IFtpPostprocessProvider, which respectively allow developers to write providers that implement functionality before or after events have occurred.

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

You must have heard about our latest & greatest server release Windows Server 8 Beta. It comes with IIS8 which has lots of cool new features. To take advantage of these features, you might be thinking about migration strategy from your existing IIS Servers. Web Deploy 3.0 fully supports migrating to IIS8 from IIS 6, IIS7 and IIS7.5.  Please follow our documentation walkthrough on migration

  1. Synchronize IIS
  2. Migrate a Web Site from IIS6.0 to IIS7 and above

Publishing experience for IIS8 is no different than publishing to IIS7, you can learn more about publishing in our tutorial "Testing Web Deploy Publishing From Visual Studio 2010 and WebMatrix." 

Note that WebMatrix 2.0 and Visual Studio 11 are still in beta and they shipped with beta version of Web Deploy 3.0. Web Deploy team has not done extensive testing of compatibility between beta versions of these products with RC version of Web Deploy 3.0, so we would recommend you to wait for WebMatrix and Visual Studio teams to release post beta builds if you are planning to do anything more than just testing out new features of Web Deploy 3.0 in test environments.

2. Automatic Backup       

One of the common feedback we received that customers often make mistakes while publishing changes to websites. This is especially true for amateur developers and small business owners. It is very hard to recover from these mistakes. In Web Deploy V3 RC we are introducing new feature "Automatic Backup" which will allow server administrators to configure servers in such a way that each publish will automatically generate a backup and store it on server. If you need to roll back or go to a previous version, you will be able to do it without involving server administrator.

You can learn more about this feature in our "Automatic Backups" Tutorial.  Please do provide your feedback on this brand new feature!

3. PowerShell Cmdlets

Web Deploy command line is very versatile which also makes it equally complex. Based on your feedback, team has invested into PowerShell Cmdlets for common Web Deploy tasks. We are releasing more than 20 PowerShell Cmdlets in this release for very first time.

Powershell cmdlets includes help description as part of cmdlets themselves. More details are provided in "PowerShell Cmdlets" tutorial.

4. Improved parameterization

Web Deploy supports parameterization of publish settings during deployment time. To learn more read Web Deploy parameterization.

Earlier versions of Web Deploy only supported replacing attribute values which already existed as part of the package. We have added support for

  1. Extend the current xml parameterization beyond attribute value replacements to a more complete xml modification story by allowing addition/deletion/replacement of new elements.
  2. Accept the replacement data for parameters to come from the server, from the package itself or from the source.

Here is one example of a parameters.xml file which will add newNode to all nodes including the root in target xml file.

<parameters>

  <parameter name="Additive" description="Add a node"   defaultValue="&lt;newNode />"  tags="">

    <parameterEntry kind="XmlFile" scope=".*" match="//*" />

  </parameter>

</parameters>

Below are some examples which demonstrate how to get the values from other places

Get values from remote server:

<parameter name="Replacement Param" defaultValue="\\myshare\share\web.config:://connectionStrings" >

  <parameterEntry kind="XMLFILE" scope="web\.config$" match="//connectionStrings" />

</parameter>

Get values from a file in the package that is being synced:

<parameter name="Replacement Param" defaultValue="\web.config:://connectionStrings" >

  <parameterEntry kind="XMLFILE" scope="web\.config$" match="//connectionStrings" />

</parameter>

More details about parameters.xml file can be found here

5. ApphostAuthOverride Provider

This is a new Web Deploy provider which will provide support for changing authentication mode for a given website. Many a times in enterprise environments applications want to choose their own authentication method using web.config file, but AppHostConfig file locks this setting.  This means that if a developer tries to set his/her site's authentication settings, IIS will not obey it.  The Application Host Authentication Override provider allows developers to configure how IIS locks an authentication setting on the server by adding a <location> tag for that setting within the server's applicationHost.config file.  Here is an example of what that looks like in config:

   <location path="siteName" overrideMode="Allow">

        <system.webServer>

            <security>

                <authentication>

                    <windowsAuthentication />

                </authentication>

            </security>

        </system.webServer>

    </location>

 Here is a few command line examples of how this could be done (msdeploy.exe is located under "%programfiles%\IIS\Microsoft Web Deploy V3"):

·         Allow Windows Authentication on Destination at site = SiteName: 
msdeploy.exe -source:ApphostAuthOverride -dest:ApphostauthOverride="<siteName>;windowsAuthentication=Allow"

·         Allow ASP.Net Forms Authentication on Destination at site = SiteName:
msdeploy.exe -source:ApphostAuthOverride -dest:ApphostauthOverride="<siteName>;aspNetAuthentication=Allow"

·         Deny Anonymous Authentication on Destination at site = SiteName:

msdeploy.exe -source:ApphostAuthOverride -dest:ApphostauthOverride="<siteName>;anonymousAuthentication=Deny"

·         Reset Windows Authentication Setting on Destination at site = SiteName:
msdeploy.exe -dest:ApphostAuthOverride="<siteName>;windowsAuthentication"

6. Others

Apart from these new features there are many bug fixes in the release. Please follow ReadMe file for more details.








Η Εταιρία | Web Hosting | Domain names | Web Information | Υπηρεσίες | Resellers | Υποστήριξη |
Copyright © 2007–09 4GR.NETWORKS, All rights reserved.