<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://cicoria.com/cs1/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>CedarLogic, LLC - Shawn Cicoria</title><link>http://cicoria.com/cs1/blogs/</link><description>Providing specialized assistance in Architecture,&lt;/b&gt; Distributed Applications, Performance, and Scaling.&lt;/b&gt;</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Learn More about Microsoft Codename "Trust Services" - TechNet Articles - Home - TechNet Wiki</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2012/02/04/learn-more-about-microsoft-codename-quot-trust-services-quot-technet-articles-home-technet-wiki.aspx</link><pubDate>Sat, 04 Feb 2012 14:50:45 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2932</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Many companies, ISV’s, and solutions have concerns about data in the cloud.&amp;#160; With PKI based encryption, Trust Services provides key management for your publisher/subscribers and a simplified SDK set of classes to abstract the encryption, decryption process.&amp;#160; Both managed classes and PowerShell add-in provided...&lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/7041.learn-more-about-microsoft-codename-trust-services.aspx"&gt;Learn More about Microsoft Codename &amp;quot;Trust Services&amp;quot; - TechNet Articles - Home - TechNet Wiki&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2932" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Azure/default.aspx">Azure</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Security/default.aspx">Security</category></item><item><title>Making Windows Azure Drive Letter Persistent</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2012/01/19/making-windows-azure-drive-letter-persistent.aspx</link><pubDate>Thu, 19 Jan 2012 20:39:49 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2931</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Windows Azure Fieldnote&lt;/p&gt;  &lt;h3&gt;Summary&lt;/h3&gt;  &lt;p&gt;Windows Azure Drives [1] provide a means to represent a file based (disk drive) persistent storage option for the various role types within Windows Azure Compute. Each of the roles within Windows Azure can mount and utilize for persistent storage (that survives reboot, reimaging, and updated deployments, of a role instances). &lt;/p&gt;  &lt;p&gt;During the mounting of a VHD as a &lt;b&gt;CloudDrive&lt;/b&gt;, the managed classes have no means to control the drive letter assignment this directly through the &lt;b&gt;CloudDrive&lt;/b&gt; managed classes that are provided through the Windows Azure SDK.&lt;/p&gt;  &lt;h3&gt;Problem&lt;/h3&gt;  &lt;p&gt;Many solutions today require the use of standard Windows File IO based access and instead of refactoring solutions to leverage the storage options available in the PaaS part of the Windows Azure platform, solutions deployed to Windows Azure can mount a Virtual Hard Disk (VHD) that is persisted in a storage account inside of a running instance. That Page Blob backed VHD is then represented through Virtual Disk Services and Windows Cloud Drive services to the running instances as a Disk Drive and addressable through File IO using a Drive Letter.&lt;/p&gt;  &lt;p&gt;While a persistent drive option is available, the drive letter assignment is determined at runtime during the mounting process. This potentially presents a problem with existing solutions, codebases, libraries that require a setting to be established prior to runtime. For example, an application configuration setting that provides a full path, including the drive letter to a location for read/write access for File IO.&lt;/p&gt;  &lt;h3&gt;Solution&lt;/h3&gt;  &lt;p&gt;The following solution takes advantage of the Virtual Disk Services through the &lt;b&gt;DiskPart.exe&lt;/b&gt; operating system utility to first identify what the VHD is mounted as and, select that volume, and re-assign the letter to the target drive letter.&lt;/p&gt;  &lt;p&gt;The original idea for the approach comes from this blog post here: &lt;a href="http://techyfreak.blogspot.com/2011/02/changing-drive-letter-of-azure-drive.html"&gt;http://techyfreak.blogspot.com/2011/02/changing-drive-letter-of-azure-drive.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;While there is a COM interface available that could be wrapped via an interop layer, the choice was made to initiate a process to take the actions required for remapping the drive letter due to simplicity. Additionally, while there is an existing managed Interop assembly available (&lt;strong&gt;Microsoft.Storage.Vds&lt;/strong&gt;) that is an undocumented and unsupported assembly.&lt;/p&gt;  &lt;p&gt;The example scenario presented does the following:&lt;/p&gt;  &lt;p&gt;1. Leverages a Windows Azure Web Role (could be a Worker Role or VM Role as well)&lt;/p&gt;  &lt;p&gt;2. Implements a Windows Console applications that:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;a. Is a Startup task – in elevated mode and background&lt;/p&gt;    &lt;p&gt;b. Runs elevated in order to affect Virtual Disk Services&lt;/p&gt;    &lt;p&gt;c. At startup:&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;Mounts the VHD from Windows Azure Storage&lt;/li&gt;      &lt;li&gt;Detects if target drive letter and re-assigns as needed to target drive letter **&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;d. Then Continuously (every 30 seconds)&lt;/p&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;i. Checks if drive is mounted on target drive letter&lt;/li&gt;      &lt;li&gt;ii. If not, reassigns drive letter **&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;** Drive Letter reassignment is done through a &lt;i&gt;System.Process&lt;/i&gt; startup object that runs Diskpart.exe with a “select volume” and “assign drive letter” command sequence.&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;Implementation&lt;/h3&gt;  &lt;p&gt;The sample solution contains the following:&lt;/p&gt;  &lt;p&gt;1. Windows Azure Web Role – simple MVC3 application that just lists the mapped &lt;b&gt;CloudDrives&lt;/b&gt; using the &lt;b&gt;CloudDrive.GetMountedDrives()&lt;/b&gt; method&lt;/p&gt;  &lt;p&gt;2. &lt;b&gt;CloudDriveManager&lt;/b&gt; class library – helper class that provides the CloudDrive management actions leveraged by the caller (either Console or other code)&lt;/p&gt;  &lt;p&gt;3. &lt;b&gt;CloudDriveManagerConsole&lt;/b&gt; – Windows console application intended to be a startup project and running in elevated mode in order to affect the assigned driver letter&lt;/p&gt;  &lt;p&gt;4. &lt;b&gt;CloudDriveManagerRole&lt;/b&gt; – implementation of &lt;b&gt;Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint&lt;/b&gt; – which allows this class to be used from within a Windows Azure Web or Worker role – however, that role entry point would need to be elevated (via the “&lt;b&gt;Runtime&lt;/b&gt;” and “&lt;b&gt;NetFxEntryPoint&lt;/b&gt;” Elements)&lt;/p&gt;  &lt;p&gt;5. &lt;b&gt;Logger&lt;/b&gt; – simple logger class that writes to a Queue for debugging purposes&lt;/p&gt;  &lt;p&gt;6. &lt;b&gt;ResponseViewer&lt;/b&gt; – simple WPF application that reads Queue messages so you can view log messages from your cloud instances – purely for debugging purposes&lt;/p&gt;  &lt;p&gt;7. &lt;b&gt;TestListDrives&lt;/b&gt; – simple Windows console application that lists the mapped &lt;b&gt;CloudDrives&lt;/b&gt; – usable from within the Role instance by using Remote Desktop and connecting to the instance&lt;/p&gt;  &lt;h4&gt;Instance Initialization&lt;/h4&gt;  &lt;p&gt;During role startup, Windows Azure will execute the Task defined in the Service definition in background mode and elevated (running as system). Inside of the console application, the implementation of &lt;b&gt;OnStart&lt;/b&gt; does the following:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public override bool OnStart()
{
    try
    {
        Initialize();
        MountAllDrives();
    }
    catch (Exception ex)
    {
        _logger.Log(&amp;quot;fail on onstart&amp;quot;, ex);
    }
    return true;
}

void MountAllDrives()
{
    try
    {
        var driveSettings = RoleEnvironment.GetConfigurationSettingValue(DRIVE_SETTINGS);
        string[] settings = driveSettings.Split(&amp;#39;:&amp;#39;);
        CloudStorageAccount account =CoudStorageAccount.FromConfigurationSetting(STORAGE_ACCOUNT_SETTING);
        string dCacheName = RoleEnvironment.GetConfigurationSettingValue(DCACHE_NAME);
        LocalResource cache = RoleEnvironment.GetLocalResource(dCacheName);
        int cacheSize = cache.MaximumSizeInMegabytes / 2;
        _cloudDriveManager = new CloudDriveManager(account, settings[0], settings[1][0], cache);
        _cloudDriveManager.CreateDrive();
        _cloudDriveManager.Mount();
    }
    catch (Exception ex)
    {
        _logger.Log(&amp;quot;fail on mountalldrives&amp;quot;, ex);
        throw;
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Mostly, the startup routine calls into the custom class &lt;b&gt;CloudDriveManager&lt;/b&gt;, which provides the simple abstraction to the Windows Azure &lt;b&gt;CloudDrive&lt;/b&gt; managed class.&lt;/p&gt;

&lt;p&gt;The custom &lt;b&gt;CreateDrive&lt;/b&gt; method calls the &lt;b&gt;CloudDrive&lt;/b&gt; create drive method in a non-destructive manner – and, for this sample, creates the initial VHD in storage if it does not already exist.&lt;/p&gt;

&lt;p&gt;Mounting calls the managed classes &lt;b&gt;CloudDrive.Moun&lt;/b&gt;t along with calling into a custom &lt;b&gt;VerifyDriveLetter&lt;/b&gt; method.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public void Mount()
{
    _logger.Log(string.Format(&amp;quot;mounting drive {0}&amp;quot;, _vhdName));
    _cloudDrive = _account.CreateCloudDrive(_vhdName);

    var driveLetter = _cloudDrive.Mount(_cacheSize, DriveMountOptions.Force);
    _logger.Log(string.Format(&amp;quot;mounted drive letter {0}&amp;quot;, driveLetter));

    var remounted = VerifyDriveLetter();
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Within &lt;b&gt;VerifyDriveLetter&lt;/b&gt; there’s some logic to validate the current state of the mounted drives. And then verification if the mounted drive is the intended drive letter.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public bool VerifyDriveLetter()
{
    _logger.Log(&amp;quot;verifying drive letter&amp;quot;);
    bool rv = false;
    if (RoleEnvironment.IsEmulated)
    {
        _logger.Log(&amp;quot;Can&amp;#39;t change drive letter in emulator&amp;quot;);
        //return;
    }

    try
    {
        DriveInfo d = new DriveInfo(_cloudDrive.LocalPath);
        if (string.IsNullOrEmpty(_cloudDrive.LocalPath))
        {
            _logger.Log(&amp;quot;verifydriveLetter: Not Mounted?&amp;quot;);
            throw new InvalidOperationException(&amp;quot;drive is notmounted&amp;quot;);
        }

        if (!char.IsLetter(_cloudDrive.LocalPath[0]))
        {
            _logger.Log(&amp;quot;verifiydriveLeter: Not a letter?&amp;quot;);
            throw new InvalidOperationException(&amp;quot;verifydriveletter - not a letter?&amp;quot;);
        }

        if (IsSameDrive())
        {
            _logger.Log(&amp;quot;is same drive; no need to diskpart...&amp;quot;);
            return true;
        }

        char mountedDriveLetter = CurrentLocalDrive(_vhdName);
        RunDiskPart(_driveLetter, mountedDriveLetter);

        if (!IsSameDrive())
        {
            var msg = &amp;quot;Drive change failed to change&amp;quot;;
                   _logger.Log(msg);
                   throw new ApplicationException(msg);
               }
               else
               {
                   Mount();
               }

               _logger.Log(&amp;quot;verifydriveletter done!!&amp;quot;);
               return rv;

           }
           catch (Exception ex)
           {
               _logger.Log(&amp;quot;error verifydriveletter&amp;quot;, ex);
               return rv;
           }

       }&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The &lt;b&gt;IsSameDrive&lt;/b&gt; method validates if the current mapped drive is indeed the planned drive letter. If not, it will return “false”.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;bool IsSameDrive()
{
    char targetDrive = _driveLetter.ToString().ToLower()[0];
    char currentDrive = CurrentLocalDrive(_vhdName);

    string msg = string.Format(
        &amp;quot;target drive: {0} - current drive: {1}&amp;quot;,
        targetDrive,
        currentDrive);

    _logger.Log(msg);

    if (targetDrive == currentDrive)
    {
        _logger.Log(&amp;quot;verifydriveLetter: already same drive&amp;quot;);
        return true;
    }
    else
        return false;

}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Finally, the &lt;b&gt;RunDiskPart&lt;/b&gt; method initiates the action of spawning a new process with the dynamically created &lt;b&gt;DiskPart&lt;/b&gt; script file that selects the existing volume name (by drive letter) and assigns the target drive letter.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;void RunDiskPart(char destinationDriveLetter, char mountedDriveLetter)
{
    string diskpartFile = Path.Combine(_cache.RootPath, &amp;quot;diskpart.txt&amp;quot;);

    if (File.Exists(diskpartFile))
    {
        File.Delete(diskpartFile);
    }

    string cmd = &amp;quot;select volume = &amp;quot; + mountedDriveLetter + &amp;quot;\r\n&amp;quot; + &amp;quot;assign letter = &amp;quot; + destinationDriveLetter;
      File.WriteAllText(diskpartFile, cmd);

      //start the process
      _logger.Log(&amp;quot;running diskpart now!!!!&amp;quot;);
      _logger.Log(&amp;quot;using &amp;quot; + cmd);
      using (Process changeletter = new Process())
      {
          changeletter.StartInfo.Arguments = &amp;quot;/s&amp;quot; + &amp;quot; &amp;quot; + diskpartFile;
          changeletter.StartInfo.FileName = 
     System.Environment.GetEnvironmentVariable(&amp;quot;WINDIR&amp;quot;) + &amp;quot;\\System32\\diskpart.exe&amp;quot;;
        //#if !DEBUG
        changeletter.Start();
        changeletter.WaitForExit();
        //#endif
    }

    File.Delete(diskpartFile);

}&lt;/pre&gt;

&lt;h3&gt;Output and Results&lt;/h3&gt;

&lt;p&gt;As an example of the interaction and how the drive appears within the running Windows Azure Role, the following screen shots illustrate the results.&lt;/p&gt;

&lt;h4&gt;Program Startup&lt;/h4&gt;

&lt;p&gt;At program startup the drive is initially mounted by the Console application – immediately the drive is mounted as the F: drive – the startup code verifies if this is the intended drive – as shown below in the logs, it isn’t, so the code initiates the RunDiskPart method setting M: as the mapped drive.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_0A5030DA.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_33E3FC0D.png" width="574" height="408" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The following shows how a Windows Azure Drive appears after the custom code reassigns the drive letter to the Operating system using Windows Explorer – the drive is selected below.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_12845671.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_58951384.png" width="576" height="344" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Within the custom MVC3 application, which simply just lists the Mounted Windows Azure drive (which runs in a separate Process non-elevated – the drive appears as a regular Operating System drive – accessible for File IO as required using the intended drive letter.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_09B44E25.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_68C0DB7D.png" width="572" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Forced Letter Change&lt;/h4&gt;

&lt;p&gt;The following shows what happens if the drive letter is intentionally changed – in this example, I just initiate a &lt;b&gt;DiskPart&lt;/b&gt; set of commands to assign the mounted drive the letter L:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_2ED19891.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_0DDE25EA.png" width="575" height="347" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the Windows Explorer window the letter now appears as L: for the &lt;b&gt;WindowsAzureDrive&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;Within approximately 30 seconds (which is the value used in the &lt;b&gt;Run&lt;/b&gt; method by the custom code) &lt;b&gt;VerifyDriveLetter&lt;/b&gt; detects it’s not the intended drive and initiates a change.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_1AD805FB.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_328F3D61.png" width="584" height="357" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;And the below image shows the drive again, appearing as the M: drive:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_6342450C.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_424ED265.png" width="615" height="371" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Future Options&lt;/h3&gt;

&lt;p&gt;Since capabilities in the Windows Azure platform change over time the ability to dictate the specific letter to be used may come available. Until then, this approach, by means of the Windows Azure Drive and Virtual Disk Services abstraction provided by the platform offers a means to accommodate codebase and application logic that is dependent upon predetermined drive letters.&lt;/p&gt;

&lt;h3&gt;References&lt;/h3&gt;

&lt;p&gt;[1] Windows Azure Drives &lt;a href="http://www.windowsazure.com/en-us/develop/net/fundamentals/cloud-storage/#drives"&gt;http://www.windowsazure.com/en-us/develop/net/fundamentals/cloud-storage/#drives&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[2] Virtual Disk Service &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb986750(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/bb986750(v=vs.85).aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[3] CloudDrive Storage Client &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storageclient.clouddrive.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storageclient.clouddrive.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[4] Diskpart.exe &lt;a href="http://technet.microsoft.com/en-us/library/cc770877(v=WS.10).aspx"&gt;http://technet.microsoft.com/en-us/library/cc770877(v=WS.10).aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[5] Task element &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#Task"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#Task&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://cicoria.com/cs1/emoticons/emotion-14.gif" alt="Devil" /&gt; Runtime element &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#Runtime"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#Runtime&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[7] NetFxEntryPoint element &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#NetFxEntryPoint"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/gg557552.aspx#NetFxEntryPoint&lt;/a&gt;&lt;/p&gt;











&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://cicoria.com/downloads/waz/MountXDriveSameLetter.zip" href="http://cicoria.com/downloads/waz/MountXDriveSameLetter.zip"&gt;Solution File: MountXDriveSameLetter.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2931" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>Viewing the User Token from Visual Studio 2010 Debugger</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/12/06/viewing-the-user-token-from-visual-studio-2010-debugger.aspx</link><pubDate>Tue, 06 Dec 2011 23:00:58 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2930</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When you’re debugging security related things, sometimes you need to take a look at the thread identities user token.&lt;/p&gt;  &lt;p&gt;When you’re inside of Visual Studio 2010 – in the watch windows you enter ‘$user’&amp;#160; and you’ll get the same as when in windbg with !token –n&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML6af2ad9_5F00_1D040A08.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML6af2ad9" border="0" alt="SNAGHTML6af2ad9" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML6af2ad9_5F00_thumb_5F00_150C67A6.png" width="682" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2930" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Tricks/default.aspx">Tricks</category></item><item><title>Microsoft TechNet–Create PDF Takeaway chapters for your set of topics–great feature just added..</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/11/30/microsoft-technet-create-pdf-takeaway-chapters-for-your-set-of-topics-great-feature-just-added.aspx</link><pubDate>Wed, 30 Nov 2011 15:25:14 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2929</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you’re like me, having those PDF version for offline review are great.&amp;#160; It was a pain before as I had to individually print web pages to single PDF using tools.&lt;/p&gt;  &lt;p&gt;Now, TechNet can track a “book” of topics for you, and then generate HTML or PDF for you to download – personal publishing &lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://cicoria.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/wlEmoticon_2D00_smile_5F00_1796848C.png" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/b/tonyso/archive/2011/09/13/roll-your-own-techdocs.aspx"&gt;Roll-your-own techdocs for free - TONYSO - Site Home - TechNet Blogs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2929" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Tricks/default.aspx">Tricks</category></item><item><title>Dennis Ritchie, Father of C and Co-Developer of Unix, Dies | Wired Enterprise | Wired.com</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/10/14/dennis-ritchie-father-of-c-and-co-developer-of-unix-dies-wired-enterprise-wired-com.aspx</link><pubDate>Fri, 14 Oct 2011 14:43:19 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2928</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Wow – I still have my &lt;a href="http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&amp;amp;qid=1318603382&amp;amp;sr=8-1" target="_blank"&gt;K&amp;amp;R book&lt;/a&gt; from a class I took at AT&amp;amp;T.&amp;#160; Cut my teeth on nix…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wired.com/wiredenterprise/2011/10/dennis-ritchie/"&gt;Dennis Ritchie, Father of C and Co-Developer of Unix, Dies | Wired Enterprise | Wired.com&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2928" width="1" height="1"&gt;</description></item><item><title>Description of Update Rollup 1 for Active Directory Federation Services (AD FS) 2.0</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/10/13/description-of-update-rollup-1-for-active-directory-federation-services-ad-fs-2-0.aspx</link><pubDate>Thu, 13 Oct 2011 12:57:07 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2927</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Multiple UPN support now available…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/2607496"&gt;Description of Update Rollup 1 for Active Directory Federation Services (AD FS) 2.0&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2927" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Security/default.aspx">Security</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ADFS/default.aspx">ADFS</category></item><item><title>Additional Mime Types in Visual Studio 2010 Development Web Server</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/10/06/additional-mime-types-in-visual-studio-2010-development-web-server.aspx</link><pubDate>Thu, 06 Oct 2011 22:38:51 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2926</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;While the development server in Visual Studio 2010 is great for most work, it does have 1 shortcoming in that if you start adding content types that are not part of the base set of known Mime types built in, you won’t affect the proper header response that is emitted to the client/browser.&lt;/p&gt;  &lt;p&gt;For example MP4 files, out of the box the development web server emits application/octet-stream or something like that.&amp;#160; What we really need is video/mp4.&lt;/p&gt;  &lt;p&gt;Now, with IIS Express, you can easily switch over to use that and just add the correct mapping to the section of the web.config when you’re running in integrated mode.&amp;#160; Such as follows:&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;system.webServer&amp;gt;
  &amp;lt;modules runAllManagedModulesForAllRequests=&amp;quot;true&amp;quot; /&amp;gt;
  &amp;lt;staticContent&amp;gt;
    &amp;lt;mimeMap fileExtension=&amp;quot;.mp4&amp;quot; mimeType=&amp;quot;video/mp4&amp;quot; /&amp;gt;
    &amp;lt;mimeMap fileExtension=&amp;quot;.m4v&amp;quot; mimeType=&amp;quot;video/m4v&amp;quot; /&amp;gt;
  &amp;lt;/staticContent&amp;gt;
&amp;lt;/system.webServer&amp;gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;However, with the Visual Studio 2010 built in Web Development server, you can’t affect the mime type support through configuration. &lt;/p&gt;

&lt;p&gt;For this a simple NuGet package is available that provides a simple HttpModule to affect the ContentType on the response headers.&amp;#160; it reads the Web.config for the site and will honor the section above – this all happens only when NOT running in Integrated Pipeline mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_3C0A4A4C.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_7448C164.png" width="418" height="49" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML6f59550_5F00_6C511F02.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML6f59550" border="0" alt="SNAGHTML6f59550" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML6f59550_5F00_thumb_5F00_5D3A4028.png" width="548" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sample Solution and Source here: &lt;a href="http://cicoria.com/downloads/SampleMimeHelper.zip"&gt;SampleMimeHelper.zip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The HttpModule makes use of dynamically loading via the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.preapplicationstartmethodattribute.aspx" target="_blank"&gt;PreApplicationStartMethod&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.web.infrastructure.dynamicmodulehelper.dynamicmoduleutility.registermodule.aspx" target="_blank"&gt;DynamicModuleHelper&lt;/a&gt; utility method that is part of the Microsoft.Web.Infrastructure namespace. &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;
using System.Configuration;
using System.Web.Configuration;
using System.Xml.Linq;
using Microsoft.Web.Infrastructure.DynamicModuleHelper;

[assembly: PreApplicationStartMethod(typeof(MimeHelper), &amp;quot;Start&amp;quot;)]

/// &amp;lt;summary&amp;gt;
/// Summary description for MimeHelper
/// &amp;lt;/summary&amp;gt;
public class MimeHelper : IHttpModule
{
    static Dictionary&amp;lt;string, string&amp;gt; s_mimeMappings;
    static object s_lockObject = new object();

    public static void Start()
    {
        if ( ! HttpRuntime.UsingIntegratedPipeline)
            DynamicModuleUtility.RegisterModule(typeof(MimeHelper));
    }

    static string GetMimeType(HttpContext context)
    {
        var ext = VirtualPathUtility.GetExtension(context.Request.Url.ToString());
        if (string.IsNullOrEmpty(ext)) return null;

        CreateMapping(context.ApplicationInstance);

        string mimeType = null;
        s_mimeMappings.TryGetValue(ext, out mimeType);

        return mimeType;

    }

    static void CreateMapping(HttpApplication app)
    {
        if (null == s_mimeMappings)
        {
            lock (s_lockObject)
            {
                if (null == s_mimeMappings)
                {
                    string path = app.Server.MapPath(&amp;quot;~/web.config&amp;quot;);
                    XDocument doc = XDocument.Load(path);

                    var s = from v in doc.Descendants(&amp;quot;system.webServer&amp;quot;).Descendants(&amp;quot;staticContent&amp;quot;).Descendants(&amp;quot;mimeMap&amp;quot;)
                            select new { mimeType = v.Attribute(&amp;quot;mimeType&amp;quot;).Value, fileExt = v.Attribute(&amp;quot;fileExtension&amp;quot;).Value };

                    s_mimeMappings = new Dictionary&amp;lt;string, string&amp;gt;();
                    foreach (var item in s)
                    {
                        s_mimeMappings.Add(item.fileExt.ToString(), item.mimeType.ToString());
                    }
                }
            }
        }
    }


    public void Dispose() { }

    public void Init(HttpApplication context)
    {
        context.EndRequest += new EventHandler(context_EndRequest);
    }

    void context_EndRequest(object sender, EventArgs e)
    {
        try
        {
            HttpApplication app = sender as HttpApplication;
            string mimeType = GetMimeType(app.Context);

            if (null == mimeType) return;

            app.Context.Response.ContentType = mimeType;
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex.Message);
        }
    }
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2926" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Code/default.aspx">Code</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>Faking SPContext–for testing only…</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/21/faking-spcontext-for-testing-only.aspx</link><pubDate>Wed, 21 Sep 2011 21:54:41 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2925</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Keith Dahlby has a good post on creating a fake SPContext.&amp;#160; Here’s the link and the code&lt;/p&gt;  &lt;p&gt;NOTE: This is not production safe code – use at own risk…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://solutionizing.net/2009/02/16/faking-spcontext/" href="http://solutionizing.net/2009/02/16/faking-spcontext/"&gt;http://solutionizing.net/2009/02/16/faking-spcontext/&lt;/a&gt;&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public static SPContext FakeSPContext(SPWeb contextWeb)
{
  // Ensure HttpContext.Current
  if (HttpContext.Current == null)
  {
    HttpRequest request = new HttpRequest(&amp;quot;&amp;quot;, web.Url, &amp;quot;&amp;quot;);
    HttpContext.Current = new HttpContext(request,
      new HttpResponse(TextWriter.Null));
  }

  // SPContext is based on SPControl.GetContextWeb(), which looks here
  if(HttpContext.Current.Items[&amp;quot;HttpHandlerSPWeb&amp;quot;] == null)
    HttpContext.Current.Items[&amp;quot;HttpHandlerSPWeb&amp;quot;] = web;

  return SPContext.Current;
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2925" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Use an Action delegate to time a method…</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/21/use-an-action-delegate-to-time-a-method.aspx</link><pubDate>Wed, 21 Sep 2011 19:15:03 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2924</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I wanted an ability to be able to simply time methods and write to a log/trace sink and a very simple approach that I ended up using was to provide a method that takes an Action delegate which would be the method that is to be timed.&lt;/p&gt;  &lt;p&gt;The following is what I came up with (this is my reminder…)&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;class Program
{
    static void Main(string[] args)
    {
        TestMethod1();
    }

    private static void TestMethod1()
    {
        LoggingHelper.TimeThis(&amp;quot;doing something&amp;quot;, () =&amp;gt;
        {
            Console.WriteLine(&amp;quot;This is the Real Method Body&amp;quot;);
            Thread.Sleep(100);
        });
    }
}

public static class LoggingHelper
{
    public static void TimeThis(string message, Action action)
    {
        string methodUnderTimer = GetMethodCalled(1);
        Stopwatch sw = Stopwatch.StartNew();
        LogMessage( string.Format(&amp;quot;started: {0} : {1}&amp;quot;, methodUnderTimer, message));
        action();
        sw.Stop();
        LogMessage(string.Format(&amp;quot;ended  : {0} : {1} : elapsed : {2}&amp;quot;, methodUnderTimer, message, sw.Elapsed));

    }

    private static string GetMethodCalled(int stackLevel)
    {
        StackTrace stackTrace = new StackTrace();
        StackFrame stackFrame = stackTrace.GetFrame(stackLevel + 1);
        MethodBase methodBase = stackFrame.GetMethod();
        return methodBase.Name;
    }

    static void LogMessage(string message){
        Console.WriteLine(&amp;quot;{0}&amp;quot;, message);
    }

}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2924" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Code/default.aspx">Code</category></item><item><title>Comparison of Windows Azure Storage Queues and Service Bus Queues « Microsoft Technologies Rocks !!!</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/20/comparison-of-windows-azure-storage-queues-and-service-bus-queues-171-microsoft-technologies-rocks.aspx</link><pubDate>Tue, 20 Sep 2011 12:06:46 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2923</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice table comparing Windows Azure Queues vs. Windows Azure AppFabric Service Bus – note the comment regarding in WAZ SDK 1.5 Queue message size is now 64KB&lt;/p&gt;  &lt;p&gt;Of course, I like the name of the blog too.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://preps2.wordpress.com/2011/09/17/comparison-of-windows-azure-storage-queues-and-service-bus-queues/"&gt;Comparison of Windows Azure Storage Queues and Service Bus Queues « Microsoft Technologies Rocks !!!&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2923" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Azure/default.aspx">Azure</category></item><item><title>MiniProfiler– A simple but effective mini-profiler for ASP.NET MVC and ASP.NET.</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/18/miniprofiler-a-simple-but-effective-mini-profiler-for-asp-net-mvc-and-asp-net.aspx</link><pubDate>Sun, 18 Sep 2011 13:34:49 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2922</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Once in a while a good tool that I find out about that helps me developing solutions comes in real handy.&amp;#160; MiniProfiler is one of those tools.&lt;/p&gt;  &lt;p&gt;Developed by the StackOverflow folks it’s available in source or binary, and NuGet packages&lt;/p&gt;  &lt;p&gt;Take a look&lt;/p&gt;  &lt;p&gt;&lt;a title="http://code.google.com/p/mvc-mini-profiler/" href="http://code.google.com/p/mvc-mini-profiler/"&gt;http://code.google.com/p/mvc-mini-profiler/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://nuget.org/List/Packages/MiniProfiler" href="http://nuget.org/List/Packages/MiniProfiler"&gt;http://nuget.org/List/Packages/MiniProfiler&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2922" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/.NET/default.aspx">.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/MVC/default.aspx">MVC</category></item><item><title>Slides for BUILD conference…</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/18/slides-for-build-conference.aspx</link><pubDate>Sun, 18 Sep 2011 12:44:56 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2921</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;On the Channel 9 site where the BUILD conference sessions are available, there are several feeds that provide the media associated with the sessions.&lt;/p&gt;  &lt;p&gt;One that’s not listed explicitly is the PowerPoint slides – that feed is here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/Events/BUILD/BUILD2011/RSS/slides" href="http://channel9.msdn.com/Events/BUILD/BUILD2011/RSS/slides"&gt;http://channel9.msdn.com/Events/BUILD/BUILD2011/RSS/slides&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2921" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Build/default.aspx">Build</category></item><item><title>Building scalable web applications with Windows Azure (ed. and on premise too!)</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/17/building-scalable-web-applications-with-windows-azure-ed-and-on-premise-too.aspx</link><pubDate>Sat, 17 Sep 2011 16:24:25 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2920</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Matthew Kerner’s session at BUILD covers many of the patterns and approaches that a well designed and highly scalable solution can do to make the most efficient use of the platform.&lt;/p&gt;  &lt;p&gt;Truth is many of the areas Matthew covers should be for on Premise too – including use of Windows Azure CDN...&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;img style="border-bottom-style:none;border-left-style:none;border-top-style:none;border-right-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/wlEmoticon_2D00_smile_5F00_45B0C56D.png" /&gt;&amp;#160; At about ~30:00 in Matthew references one of my posts on Windows Azure CDN and using it with your Compute role (hosted service) as an CDN origin…&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Building scalable web apps with Windows Azure   &lt;br /&gt;&lt;a title="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-870T" href="http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-870T"&gt;http://channel9.msdn.com/events/BUILD/BUILD2011/SAC-870T&lt;/a&gt;&lt;/p&gt; &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2920" width="1" height="1"&gt;</description></item><item><title>Bringing Hyper-V to “Windows 8” - Building Windows 8 - Site Home - MSDN Blogs</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/09/07/bringing-hyper-v-to-windows-8-building-windows-8-site-home-msdn-blogs.aspx</link><pubDate>Wed, 07 Sep 2011 21:27:15 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2917</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is huge – and a welcomed addition.&amp;#160; Been waiting too long for this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/b8/archive/2011/09/07/bringing-hyper-v-to-windows-8.aspx"&gt;Bringing Hyper-V to “Windows 8” - Building Windows 8 - Site Home - MSDN Blogs&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2917" width="1" height="1"&gt;</description></item><item><title>Hosted Service as a Windows Azure CDN Origin Tips</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/07/10/hosted-service-as-a-windows-azure-cdn-origin-tips.aspx</link><pubDate>Sun, 10 Jul 2011 17:27:30 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2916</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The Windows Azure Content Delivery Network (CDN) helps improve the solution experience by putting content closer to the end-user, enhances availability, geo-distribution, scalability, lower latency delivery, and performance. If that’s the goal we want to be sure that when we instantiate the source of this content at the origin it’s as CDN friendly as we need.&lt;/p&gt;  &lt;p&gt;In Windows Azure, when you’re running under IIS7.x /ASP.NET you have to be aware of the inherent behavior associated with Output Caching as it is part of the standard deployment of IIS7.x.&lt;/p&gt;  &lt;p&gt;Some of that inherent behavior affects how cache-friendly your content (Http Response) will be as the CDN directly consumes your Hosted Service endpoint ( http&lt;img src="http://cicoria.com/cs1/emoticons/emotion-56.gif" alt="Sleep" /&gt;://yourservice:80|443/cdn ) on behalf of your users.&lt;/p&gt;  &lt;p&gt;If you don’t understand how your solution emits these HTTP headers, you will end up with NO caching – defeating the purpose of the CDN (in fact making performance worse) and additional costs incurred.&lt;/p&gt;  &lt;p&gt;The areas we’ll briefly take a look at here are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Working with the ASP.NET OutputCache module for CDN Friendly HTTP Headers &lt;/li&gt;    &lt;li&gt;Vary:* Headers &lt;/li&gt;    &lt;li&gt;Compressed content with the CDN &lt;/li&gt;    &lt;li&gt;Use of IIS Virtual Application / Directories under Windows Azure &lt;/li&gt;    &lt;li&gt;Provide your own OutputCache module implementation &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Working with the ASP.NET OutputCache Module&lt;/h2&gt;  &lt;h3&gt;Default behavior&lt;/h3&gt;  &lt;p&gt;The following code is an example of what developers generally provided with anticipation that the HTTP headers, specifically the Cache-control header will be emitted with a CDN friendly HTTP header – or any cache for that matter.&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;using (var image = ImageUtil.RenderImage(…))
 {
     context.Response.Cache.SetMaxAge(TimeSpan.FromMinutes(Constants.MA));
     context.Response.Cache.SetCacheability(HttpCacheability.Public);
     context.Response.ContentType = &amp;quot;image/jpeg&amp;quot;;
     image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
     context.Response.OutputStream.Flush();
 }&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Under ASP.NET 3.5/4.x, this will result in the following &lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_15CD6B3E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_7B8D0219.png" width="359" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;---request begin---
GET /image/0.jpg HTTP/1.0
User-Agent: Wget/1.11.4
Accept: */*
Host: az30993.vo.msecnd.net
Connection: Keep-Alive
---response begin---
HTTP/1.0 200 OK
Cache-Control: public
Content-Type: image/jpeg
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 08 Jul 2011 11:26:01 GMT
Content-Length: 6976
X-Cache: MISS from cds168.ewr9.msecn.net
Connection: keep-alive&lt;/pre&gt;

&lt;p&gt;With that set of headers, you will encounter a cache MISS on every request – with a read-through to the Hosted Service origin. You might not notice the impact right away as it can get picked up by the OutputCache module – but you’ve defeated the purpose of the CDN – and made the request performance worse.&lt;/p&gt;

&lt;p&gt;The sample solution with this post provides a set of test scenarios for manipulating the HttpResponse under a standard IHttpHandler and under MVC3. If you take a look at the code you’ll see that 3 things are done to help diagnose the situation.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Request Logger – this is a simple request logger that captures requests for the purposes of providing a simple view against the incoming requests (could have used IIS logs, but this is a simple way to get the requests I’m interested in and display them) &lt;/li&gt;

  &lt;li&gt;Kernel caching is disabled via the web.config – with this enabled requests won’t make it into your ASP.NET pipeline when it’s a cache hit – giving you a false positive on understanding if and when CDN requests are “leaking” through and not being cached at the CDN &lt;/li&gt;

  &lt;li&gt;OOB OutputCache module is removed, then re-added – this ensures it’s lower in the module list at request time allowing the Request Logger to be higher up in the call chain so I’m sure to capture the inbound requests – if they’re cached or not in the OutputCache module &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h5&gt;Set SlidingExpiration on Response&lt;/h5&gt;

&lt;p&gt;The easiest fix is to ensure you set SlidingExpiration to true on the response. This will ensure that the Cache-control header will contain your desired “public, max-age=xxxx”&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public void ProcessRequest(HttpContext context)
{
    using (var image = ImageUtil.RenderImage(…)
    {
       context.Response.Cache.SetCacheability(HttpCacheability.Public);
       context.Response.Cache.SetMaxAge(TimeSpan.FromMinutes(Config.MaxAge));
       context.Response.ContentType = &amp;quot;image/jpeg&amp;quot;;
       context.Response.Cache.SetSlidingExpiration(true);
       image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
    }
}&lt;/pre&gt;

&lt;h5&gt;Set an explicit Expires on the Response&lt;/h5&gt;

&lt;pre class="brush: csharp;"&gt;public void ProcessRequest(HttpContext context)
{
    using (var image = ImageUtil.RenderImage(…)
    {
      context.Response.Cache.SetCacheability(HttpCacheability.Public);
      context.Response.Cache.SetExpires(DateTime.Now.AddMinutes(Config.MA));
      context.Response.ContentType = &amp;quot;image/jpeg&amp;quot;;
      image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
      context.Response.OutputStream.Flush();
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h5&gt;Use Downstream as the location when using the MVC OutputCache Attribute&lt;/h5&gt;

&lt;pre class="brush: csharp;"&gt;[OutputCache(CacheProfile = &amp;quot;CacheDownstream&amp;quot;)]
public ActionResult Image3()
{
    MemoryStream oStream = new MemoryStream();
    using (Bitmap obmp = ImageUtil.RenderImage(…)
    {
       obmp.Save(oStream, ImageFormat.Jpeg);
       oStream.Position = 0;
       return new FileStreamResult(oStream, &amp;quot;image/jpeg&amp;quot;);
    }
}

//web.config
 &amp;lt;caching&amp;gt;
      &amp;lt;outputCacheSettings&amp;gt;
        &amp;lt;outputCacheProfiles&amp;gt;
          &amp;lt;add name=&amp;quot;CacheDownstream&amp;quot; 
               location=&amp;quot;Downstream&amp;quot; 
               duration=&amp;quot;1000&amp;quot; 
               enabled=&amp;quot;true&amp;quot;/&amp;gt;
        &amp;lt;/outputCacheProfiles&amp;gt;
      &amp;lt;/outputCacheSettings&amp;gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h5&gt;Append a query string&lt;/h5&gt;

&lt;p&gt;Providing a query string on the request affects the Cache-control header. Even if you add just a “?” after the URL path, the OutputCache module will then emit your intended max-age.&lt;/p&gt;

&lt;h5&gt;Disable OutputCache module – via config&lt;/h5&gt;

&lt;p&gt;You can do this by removing it from the ASP.NET pipeline altogether, or remove it in the sub-path where /cnd is located (or Virtual Application – see section later). This disables all Output caching for all requests.&lt;/p&gt;

&lt;h5&gt;Disable OutputCache module – via code – per request&lt;/h5&gt;

&lt;p&gt;You can also choose to bypass the OutputCache by affecting the Response with the following code&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public void ProcessRequest(HttpContext context)
{
    using (var image = ImageUtil.RenderImage(…)
    {
       context.Response.Cache.SetCacheability(HttpCacheability.Public);
       context.Response.Cache.SetMaxAge(TimeSpan.FromMinutes(Config.MA));
       context.Response.Cache.SetNoServerCaching();
       context.Response.ContentType = &amp;quot;image/jpeg&amp;quot;;
       image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
       context.Response.OutputStream.Flush();
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h5&gt;Implement your own OutputCache module&lt;/h5&gt;

&lt;p&gt;You can take a look at the links in the section on implementing your own OutputCache module to get an idea on the implementation effort, but the reasoning why you would want to is varied – which I’ll cover a couple of reasons in that section.&lt;/p&gt;

&lt;h3&gt;Vary:* Headers and Caching&lt;/h3&gt;

&lt;p&gt;Ensure you’re not emitting Vary:* by headers at all if you want to take advantage of caching – either with the Windows Azure CDN or not – as the specification indicates responses with Vary:* should not be cached and only handled at the origin.&lt;/p&gt;

&lt;p&gt;From RFC2616: &amp;quot;A Vary header field-value of &amp;quot;*&amp;quot; always fails to match and subsequent requests on that resource can only be properly interpreted by the origin server.&amp;quot;&lt;/p&gt;

&lt;h3&gt;Compressed content with the CDN&lt;/h3&gt;

&lt;p&gt;One of the reasons you would want to move your origin from Windows Azure Storage to a Hosted Service is to take advantage of compression. As part of IIS7.x, you can ensure that static and dynamic compression is enabled for your content – this will then cascade through to the Windows Azure CDN and provide an overall better experience for your end users.&lt;/p&gt;

&lt;h3&gt;Use of IIS Virtual Application / Directories under Windows Azure&lt;/h3&gt;

&lt;p&gt;Today, using Hosted Service as an origin to Windows Azure CDN requires a production deployment of your service listening at the path http&lt;img src="http://cicoria.com/cs1/emoticons/emotion-56.gif" alt="Sleep" /&gt;://yourserviceDnsName:80|443/cdn. Currently we do not support Hosted Services as origins in staging.&lt;/p&gt;

&lt;p&gt;All that is required is that your service provide responses under the /cdn path. You can achieve this with a WebRole that has a directory (path) under your main site.&lt;/p&gt;

&lt;p&gt;What happens if you need (or desire) to isolate that path (/cdn)? Under Windows Azure, you can take advantage of IIS Virtual Applications / Directories under your main WebRole.&lt;/p&gt;

&lt;p&gt;The following Service Definition illustrates the approach by taking advantage of the Full IIS model and the VirtualApplication element. The key to the approach here for your solution in the development fabric is to ensure the physical directory is relative to the MainWeb path.&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;ServiceDefinition name=&amp;quot;TR13VirtualApp&amp;quot; xmlns=&amp;quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition&amp;quot;&amp;gt;
  &amp;lt;WebRole name=&amp;quot;MainWeb&amp;quot; vmsize=&amp;quot;ExtraSmall&amp;quot;&amp;gt;
    &amp;lt;Sites&amp;gt;
      &amp;lt;Site name=&amp;quot;Web&amp;quot;&amp;gt;
        &amp;lt;VirtualApplication name=&amp;quot;cdn&amp;quot; physicalDirectory=&amp;quot;../MainWebCdn&amp;quot; /&amp;gt;
        &amp;lt;Bindings&amp;gt;
          &amp;lt;Binding name=&amp;quot;Endpoint1&amp;quot; endpointName=&amp;quot;Endpoint1&amp;quot; /&amp;gt;
        &amp;lt;/Bindings&amp;gt;
      &amp;lt;/Site&amp;gt;
    &amp;lt;/Sites&amp;gt;
    … &lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;This results in a deployment up on Windows Azure as the following – with a single site, and 2 application pools:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_3A7E82B5.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_3939E9D6.png" width="544" height="177" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple VS2010 Solution is also provided at the end of the post and the following links provide further detail:&lt;/p&gt;

&lt;h4&gt;Creating Virtual Applications / Directories&lt;/h4&gt;

&lt;p&gt;The Windows Azure Training kit contains a sample walkthrough that demonstrates the approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_advancedwebandworkerrolesvs2010lab_topic2.aspx"&gt;http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_advancedwebandworkerrolesvs2010lab_topic2.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, Wade Wegner goes into a bit of detail as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/"&gt;http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Why provide your own OutputCache module implementation?&lt;/h3&gt;
So, what would make you want to write your own OutputCache module implementation? Recall that the Service model when you have many instances in your Windows Azure Role may result in different host instances servicing requests. 

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_2A230AFC.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_767A9E9D.png" width="499" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;If that content is VERY expensive to produce….&lt;/h4&gt;

&lt;p&gt;You now have N (# of instances) producing possibly exact or similar replicas of your content. Not exactly a desirable effect if your transaction costs are high (maybe you’re reaching out to external services, or on premise mainframes, etc.)&lt;/p&gt;

&lt;h4&gt;Take advantage of Windows Azure AppFabric Caching&lt;/h4&gt;

&lt;p&gt;Either replacing the OutputCache module with your own implementation, or leveraging your own request model (that will still work with or bypass the OutputCache module) you can instantiate a single copy of that content in AppFabric Caching – thereby reducing the overall cost associated with repetitive content creation. Whatever your choice, ensure to factor in operational costs of AppFabric to see if it meets your economic model.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_03084BBA.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_4597E732.png" width="544" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h4&gt;Implement your own OutputCache&lt;/h4&gt;

&lt;p&gt;The following links provide some guidance on replacing OutputCache module – which can be done at the /cdn path level if required.&lt;/p&gt;

&lt;h5&gt;Custom OutputCacheProvider&lt;/h5&gt;

&lt;p&gt;The following is a sample implementation of a custom OutputCache module under NetFx 4.0.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/gunnarpeipman/archive/2009/11/19/asp-net-4-0-writing-custom-output-cache-providers.aspx"&gt;http://weblogs.asp.net/gunnarpeipman/archive/2009/11/19/asp-net-4-0-writing-custom-output-cache-providers.aspx&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;ASP.NET 4.0 Caching Overview&lt;/h5&gt;

&lt;p&gt;Check out the following link on ASP.NET 4.0 caching in general to get an idea of OutputCache module.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178597.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms178597.aspx&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Solution Files&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/downloads/waz/CdnTest.zip"&gt;CDN Test Solution&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/downloads/waz/VirtualApp.zip"&gt;Virtual App Sample&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2916" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Azure/default.aspx">Azure</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Code/default.aspx">Code</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Caching/default.aspx">Caching</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/CDN/default.aspx">CDN</category></item><item><title>Raffaele Rialdi DeployManager June 2011 edition–Now supports SAN certificates</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/07/06/raffaele-rialdi-deploymanager-june-2011-edition-now-supports-san-certificates.aspx</link><pubDate>Wed, 06 Jul 2011 19:15:26 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2915</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Raffaele Rialdi has been adding features to his certificate management tool.&amp;#160; Already supporting wildcard certificates, he’s now added SAN cert support.&lt;/p&gt;  &lt;p&gt;But it’s more than certificate management too.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.iamraf.net/Tools/deploymanager-june-2011-edition"&gt;IAmRaf - Tools&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2915" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category></item><item><title>Identity Claims Encoding for SharePoint</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/30/identity-claims-encoding-for-sharepoint.aspx</link><pubDate>Thu, 30 Jun 2011 15:44:13 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2914</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Just to remind myself, the list of claim types and their encodings are listed here at the bottom.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/gg481769.aspx" href="http://msdn.microsoft.com/en-us/library/gg481769.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg481769.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Where for example:&lt;/p&gt;  &lt;p&gt;i:0#.w|contoso\scicoria&lt;/p&gt;  &lt;p&gt;‘i’ = identity, could be ‘c’ for others&lt;/p&gt;  &lt;p&gt;# == SPClaimTypes.UserLogonName&lt;/p&gt;  &lt;p&gt;. == Microsoft.IdentityModel.Claims.ClaimValueTypes.String&lt;/p&gt;  &lt;p&gt;Table for reference:&lt;/p&gt;  &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:13.6pt;" color="#000000"&gt;&lt;font style="font-weight:bold;"&gt;Table 1. Claim types encoding&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;table style="line-height:normal;list-style-type:disc;"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;th align="center"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Character &lt;/font&gt;&lt;/font&gt;&lt;/th&gt;        &lt;th align="center"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Claim Type &lt;/font&gt;&lt;/font&gt;&lt;/th&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.IdentityProvider&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;”&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.UserIdentifier&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;#&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.UserLogonName&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;$ &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.DistributionListClaimType&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;%&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.FarmId&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;&amp;amp;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.ProcessIdentitySID&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;‘&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.ProcessIdentityLogonName&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;SPClaimTypes.IsAuthenticated&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimTypes.PrimarySid&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;*&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimTypes.PrimaryGroupSid&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;+&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimTypes.GroupSid&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;-&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimTypes.Role&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Anonymous&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;/&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Authentication&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.AuthorizationDecision&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Country&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.DateOfBirth&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;3&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.DenyOnlySid&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;4&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Dns&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;5&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Email&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;6&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Gender&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;7&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.GivenName&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;8&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Hash&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;9&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.HomePhone&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Locality&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.MobilePhone&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Name&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.NameIdentifier&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;@&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.OtherPhone&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;[&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.PostalCode&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;\&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.PPID&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Rsa&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;^&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Sid&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;_&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Spn&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;`&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.StateOrProvince&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;a&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.StreetAddress&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;b&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Surname&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;c&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.System&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;d&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Thumbprint&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;e&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Upn&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;f&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Uri&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;g&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;System.IdentityModel.Claims.ClaimTypes.Webpage&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h3 style="line-height:normal;list-style-type:disc;clear:none;" class="subHeading"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:13.6pt;" color="#000000"&gt;&lt;font style="font-weight:bold;"&gt;Table 2. Claim value types encoding&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt;  &lt;table style="line-height:normal;list-style-type:disc;"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;&lt;font style="font-size:12pt;"&gt;Character&lt;/font&gt;&lt;/strong&gt;&lt;font style="font-size:12pt;"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font color="#000000"&gt;&lt;strong&gt;&lt;font style="font-size:12pt;"&gt;Claim Type&lt;/font&gt;&lt;/strong&gt;&lt;font style="font-size:12pt;"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Base64Binary&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;“&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Boolean&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;#&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Date&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;$&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Datetime&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;%&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.DaytimeDuration&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;&amp;amp;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Double&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;‘&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.DsaKeyValue&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;(&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.HexBinary&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Integer&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;*&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.KeyInfo&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;+&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Rfc822Name&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;-&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.RsaKeyValue&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.String&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;/&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.Time&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.X500Name&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:12pt;" color="#000000"&gt;Microsoft.IdentityModel.Claims.ClaimValueTypes.YearMonthDuration&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2914" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Identity/default.aspx">Identity</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Federation/default.aspx">Federation</category></item><item><title>Creating Wildcard Certificates with makecert.exe</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/28/creating-wildcard-certificates-with-makecert-exe.aspx</link><pubDate>Wed, 29 Jun 2011 01:14:36 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2913</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Be nice to be able to make wildcard certificates for use in development with makecert – turns out, it’s real easy.&amp;#160; Just ensure that your CN=&amp;#160; is the wildcard string to use.&lt;/p&gt;  &lt;p&gt;The following sequence generates a CA cert, then the public/private key pair for a wildcard certificate&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;REM make the CA
rem CA Certificate:
makecert -r -pe -n &amp;quot;CN=AA Contoso Test Root Authority&amp;quot; -ss CA -sr CurrentUser -a sha1 -sky signature -cy authority -sv CA.pvk CA.cer -len 2048


REM now make the server wildcard cert
makecert -pe -n &amp;quot;CN=*.contosotest.com&amp;quot; -a sha1 -len 2048 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -ic CA.cer -iv CA.pvk -sp &amp;quot;Microsoft RSA SChannel Cryptographic Provider&amp;quot; -sy 12 -sv wildcard.pvk wildcard.cer

pvk2pfx -pvk wildcard.pvk -spc wildcard.cer -pfx wildcard.pfx&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2913" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Certificates/default.aspx">Certificates</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ADFS/default.aspx">ADFS</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Tricks/default.aspx">Tricks</category></item><item><title>Lorem Ipsum–Generating in Word 2010</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/27/lorem-ipsum-generating-in-word-2010.aspx</link><pubDate>Mon, 27 Jun 2011 19:17:34 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2912</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Well, apparently I missed this hidden feature having used the Lorem Ipsum website for some time, but if you enter the following in blank Word document – you’ll get 10 paragraphs of generated text:&lt;/p&gt;  &lt;p&gt;=Lorem(10)&lt;/p&gt;  &lt;p&gt;Such as:&lt;/p&gt;  &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.&lt;/p&gt;  &lt;p&gt;Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.&lt;/p&gt;  &lt;p&gt;Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.&lt;/p&gt;  &lt;p&gt;Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.&lt;/p&gt;  &lt;p&gt;Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy.&lt;/p&gt;  &lt;p&gt;Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla.&lt;/p&gt;  &lt;p&gt;Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat.&lt;/p&gt;  &lt;p&gt;Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique.&lt;/p&gt;  &lt;p&gt;Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.&lt;/p&gt;  &lt;p&gt;Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2912" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Tricks/default.aspx">Tricks</category></item><item><title>HACK: Forcing FBA Token Refresh against SPClaimProvider with No Credential Challenge</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/15/hack-forcing-fba-token-refresh-against-spclaimprovider-with-no-credential-challenge.aspx</link><pubDate>Wed, 15 Jun 2011 13:00:53 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2911</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The approach takes advantage of the SP 2010 OOB Session Token handler and FBA claims provider implementation that during a period of token lifetime, if there is activity during the period of time that can be defined as &amp;quot;EW&amp;quot; in the image in the section &amp;quot;Background&amp;quot; below, that the &lt;strong&gt;SPSecurityTokenManager&lt;/strong&gt; will, with the FBA provider, reissue a Session Token with new SessionToken &lt;strong&gt;ValidTo&lt;/strong&gt; and &lt;strong&gt;ValidFrom&lt;/strong&gt; times without forcing a re-challenge for user credentials (username and password). &lt;/p&gt;  &lt;p&gt;Additionally, it takes advantage of the ability to provide an event handler, on the &lt;strong&gt;SessionAuthentcationModule&lt;/strong&gt; (&lt;strong&gt;SPSessionAuthenticationModule&lt;/strong&gt;) to cause a reissue of the token temporarily with an expiry time (&lt;strong&gt;ValidTo&lt;/strong&gt;) that will cause a &lt;strong&gt;SPSessionToken&lt;/strong&gt; cache miss – thus forcing the re-issue by the &lt;strong&gt;SPSecurityTokenManager&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;General Approach &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The following is a contrived example and uses a rudimentary approach for determine how/when to indicate that the token should be &amp;quot;refreshed&amp;quot; This is done by hooking into the WIF Session Authentication Module&amp;#39;s (SAM) Event &amp;quot;&lt;strong&gt;SessionSecurityTokenReceived&lt;/strong&gt;&amp;quot;. &lt;/p&gt;  &lt;p&gt;The approach taken, and shown on the internet in several posts is to subclass the &lt;strong&gt;HttpApplication&lt;/strong&gt; implementation. &lt;/p&gt;  &lt;p&gt;The approach I recommend is to leverage the ability of any &lt;strong&gt;HttpApplication&lt;/strong&gt; by ways of built in ability to identify all &lt;strong&gt;HttpModules&lt;/strong&gt; loaded for that ASP.NET application (SP included) and determine if there are Event handlers specified by ways of the &lt;strong&gt;Global.asax&lt;/strong&gt; in the Root of the SP IIS Site. This is handled by the &lt;strong&gt;System.Web.HttpApplication.HookupEventHandlersForApplicationAndModules&lt;/strong&gt; method. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; There are alternatives that I&amp;#39;ve also tested that work – 1 approach is to register a new &lt;strong&gt;HttpModule&lt;/strong&gt;, then in that &lt;strong&gt;HttpModule&lt;/strong&gt; is to register &amp;quot;1&amp;quot; time a handler for the SAM&amp;#39;s &lt;strong&gt;SessionSecurityTokenReceived&lt;/strong&gt; event. This requires a method of indicating at the application level that a handler has already been registered. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Scenario Supported &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The general scenario is: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User is already logged onto the site with a valid token &lt;/li&gt;    &lt;li&gt;At time required to force a Claims refresh, user will click a link or system will determine how to initiate an &lt;strong&gt;HttpRequest&lt;/strong&gt; that will call the logic required for forcing the refresh &lt;/li&gt;    &lt;li&gt;System receives request &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;&lt;strong&gt;SessionAuthenticationModule&lt;/strong&gt; raises event that custom code will handle &lt;/div&gt;      &lt;ol&gt;       &lt;li&gt;&lt;strong&gt;This is done by HttpRequest inspection – the sample looks for a Url that contains &amp;quot;RefreshToken.aspx&amp;quot; – there are other means to provide a similar approach.&lt;/strong&gt; &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;Custom code identifies the SP &lt;strong&gt;LogonTokenCacheExpirationWindow&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Using &lt;strong&gt;LogonTokenCacheExpirationWindow&lt;/strong&gt;, custom code forces a re-issue of token that has a &lt;strong&gt;ValidTo&lt;/strong&gt; that will fall into the &lt;strong&gt;LogonTokenCacheExpirationWindows&lt;/strong&gt; – eg. &lt;/li&gt; &lt;/ol&gt;  &lt;pre class="brush: csharp;"&gt;DateTime newValidTo = DateTime.UtcNow.Add(logonWindow); &lt;/pre&gt;

&lt;ol&gt;
  &lt;li&gt;System (SP Session Cache) determines that the token requires a re-issue &lt;/li&gt;

  &lt;li&gt;System calls &lt;strong&gt;SPSecurityToken&lt;/strong&gt; Manager – to reissue all claims for user, bypassing the Logon credentials prompt &lt;/li&gt;

  &lt;li&gt;During the &lt;strong&gt;SPSecurityToken&lt;/strong&gt; manager re-issue any custom &lt;strong&gt;SPClaimProvider&lt;/strong&gt; types loaded are also called – using FBA and &lt;strong&gt;SPClaimProvider&lt;/strong&gt; will make a call to its &lt;strong&gt;FillClaimsForEntity&lt;/strong&gt; inside of the SP STS. &lt;/li&gt;

  &lt;li&gt;Session continues with new &lt;strong&gt;SessionToken&lt;/strong&gt; using configuration based values for &lt;strong&gt;ValidFrom&lt;/strong&gt;, &lt;strong&gt;ValidTo&lt;/strong&gt; as defined in the &lt;strong&gt;SPSecurityTokenConfig&lt;/strong&gt;. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Sample Code for Event Handler &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sample code uses another class to contain the code; your implementation could just as easily keep this in the &lt;strong&gt;global.asax&lt;/strong&gt; – however, I&amp;#39;m of the belief that the &lt;strong&gt;global.asax&lt;/strong&gt; should be kept as pristine as possible. &lt;/p&gt;

&lt;p&gt;The following code is placed in an assembly that is resolvable through normal fusion – that is, it could be a private assembly. I&amp;#39;ve chosen GAC in the sample project just for the ease of development. &lt;/p&gt;

&lt;p&gt;The code below handles the event and just looks for a page (Url) that contains a well-known request string. This could be anything, but ensure that it&amp;#39;s not a common page and based upon the application needs, how your logic will determine a need to refresh all claims. &lt;/p&gt;

&lt;p&gt;
  &lt;pre class="brush: csharp;"&gt;&amp;lt;%@ Assembly Name=&amp;quot;Microsoft.SharePoint&amp;quot; %&amp;gt;
&amp;lt;%@ Assembly Name=&amp;quot;RefreshClaimsSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=329ca2a6e4eeb8c6&amp;quot; %&amp;gt;
&amp;lt;%@ Application Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;Microsoft.SharePoint.ApplicationRuntime.SPHttpApplication&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace=&amp;quot;Microsoft.IdentityModel.Web&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace=&amp;quot;Microsoft.IdentityModel.Tokens&amp;quot; %&amp;gt;
&amp;lt;%@ Import Namespace=&amp;quot;Microsoft.SharePoint.IdentityModel&amp;quot; %&amp;gt;

&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;
    void SessionAuthentication_SessionSecurityTokenReceived(object sender, SessionSecurityTokenReceivedEventArgs e) 
    {
        RefreshClaimsSample.SampleRefreshClaims.ForceRefreshClaims(sender, e);
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;
public static void ForceRefreshClaims(object sender, SessionSecurityTokenReceivedEventArgs e)
{
    if (HttpContext.Current.Request.Url.AbsoluteUri.Contains(&amp;quot;RefreshClaims.aspx&amp;quot;))
    {
        SessionAuthenticationModule sam = sender as SessionAuthenticationModule;
        var logonWindow = SPSecurityTokenServiceManager.Local.LogonTokenCacheExpirationWindow;

        DateTime newValidTo = DateTime.UtcNow.Add(logonWindow);

        e.SessionToken = sam.CreateSessionSecurityToken(
            e.SessionToken.ClaimsPrincipal,
            e.SessionToken.Context,
            e.SessionToken.ValidFrom,
            newValidTo,
            e.SessionToken.IsPersistent);

        e.ReissueCookie = true;
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Wiring up Event Handler &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the SP &lt;strong&gt;Global.asax&lt;/strong&gt; provided a method signature that matches the event from the SAM. &lt;/p&gt;

&lt;p&gt;The requirements are that the signature is as follows: &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#00b050;"&gt;void &lt;/span&gt;&amp;lt;&lt;span style="color:#c00000;"&gt;&lt;em&gt;moduleNameFromConfig&lt;/em&gt;&lt;/span&gt;&amp;gt;_&amp;lt;&lt;span style="color:#0070c0;"&gt;&lt;em&gt;eventName&lt;/em&gt;&lt;/span&gt;&amp;gt; ( &lt;span style="color:#7030a0;"&gt;&lt;em&gt;eventArgsType&lt;/em&gt; &lt;/span&gt;) &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Where: &lt;/p&gt;

&lt;ol style="margin-left:54pt;"&gt;
  &lt;li&gt;moduleNameFromConfig – must match the name attribute from the module as specified in the &lt;a href="mailto:/system.webServer/modules/add/@name"&gt;/system.webServer/modules/add/@name&lt;/a&gt; element. &lt;/li&gt;

  &lt;li&gt;eventName – must match the event name as defined in the HttpModule&amp;#39;s public event &lt;/li&gt;

  &lt;li&gt;eventArgsType – must match the event arguments type that is defined for the event. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML7380ba9_5F00_46EA4FD1.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML7380ba9" border="0" alt="SNAGHTML7380ba9" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML7380ba9_5F00_thumb_5F00_2BD180C3.png" width="709" height="486" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family:consolas;color:blue;font-size:9pt;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Background &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_3F123762.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_3786C7F5.png" width="489" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above diagram, the settings: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;TL = FormsTokenLifeTime &lt;/li&gt;

  &lt;li&gt;EW = LogonTokenCacheExpirationWindow &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These settings are obtained and modified via PowerShell under the SPSecurityT0kenServiceConfig set of cmdlets. &lt;/p&gt;

&lt;p&gt;For the following samples, assume the following: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;TL = 10 Minutes &lt;/li&gt;

  &lt;li&gt;EW = 4 Minutes &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TL – EW = 6 Minutes&lt;/p&gt;





&lt;p&gt;&lt;a href="http://cicoria.com/cicoriac/downloads/RefreshClaimsSln.zip"&gt;Solution Zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2911" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Identity/default.aspx">Identity</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Code/default.aspx">Code</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/WIF/default.aspx">WIF</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Security/default.aspx">Security</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/ADFS/default.aspx">ADFS</category></item><item><title>SharePoint 2010 FBA and Sliding Sessions</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/10/sharepoint-2010-fba-and-sliding-sessions.aspx</link><pubDate>Fri, 10 Jun 2011 20:41:10 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2910</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This is to provide a little bit of explanation on the implementation of FBA authentication with SP 2010. There have been blog posts that indicate there are no sliding sessions, but with a little manipulation and understanding of some of the settings, there is somewhat of support for sliding sessions and re-issuance of tokens. The current model provides for a little trade-off on performance as re-requests to the FBA providers and also any SP Custom Claim providers can have impact on overall performance.&lt;/p&gt;  &lt;p&gt;The following diagram represents the initial static view of the SP 2010 Security Token Service Configuration settings that control the management of Tokens issued under Forms Based Authentication (FBA) authentication.&lt;/p&gt;  &lt;p&gt;The current SP 2010 April 2011 CU’s does support a level of sliding sessions as long as a request (user activity) occurs in the window of time after token issuance (logon or re-issuance) defined in the “EW” segment below.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_6FD6F6DD.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/image_5F00_thumb_5F00_6E262B09.png" width="451" height="130" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the above diagram, the settings:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TL = FormsTokenLifeTime &lt;/li&gt;    &lt;li&gt;EW = LogonTokenCacheExpirationWindow &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;These settings are obtained and modified via PowerShell under the SPSecurityT0kenServiceConfig set of cmdlets.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For the following samples, assume the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TL = 10 Minutes &lt;/li&gt;    &lt;li&gt;EW = 4 Minutes &lt;/li&gt;    &lt;li&gt;TL – EW = 6 Minutes &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Example 1:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User Logon occurs &lt;/li&gt;    &lt;li&gt;User is Inactive for 11 minutes (&amp;gt; 10 minutes) &lt;/li&gt;    &lt;li&gt;At next request: System Presents Forms based logon (or identity selector) to user forcing re-authentication &lt;strong&gt;(All Claims Providers Called)&lt;/strong&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Example 2:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User Logon occurs &lt;/li&gt;    &lt;li&gt;User is Inactive for 3 minutes &lt;/li&gt;    &lt;li&gt;User issues Request &lt;/li&gt;    &lt;li&gt;Token is NOT updated as request occurred in the “TL – EW” window &lt;/li&gt;    &lt;li&gt;User remains Inactive for 8 more minutes (&amp;gt; 7 or more than 3 + 7 = 10, which is the original window &lt;/li&gt;    &lt;li&gt;At next request: System Presents Forms based logon (or identity selector) to user forcing re-authentication &lt;strong&gt;(All Claims Providers Called)&lt;/strong&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Example 3:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;User Logon occurs &lt;/li&gt;    &lt;li&gt;User is inactive for 8 minutes &lt;/li&gt;    &lt;li&gt;User issues Request &lt;/li&gt;    &lt;li&gt;System attempts to re-issue token, skipping password check &lt;/li&gt;    &lt;li&gt;System re-issues new Token with updated ValidFrom / ValidTo timestamp based upon current clock &lt;strong&gt;(All Claims Providers Called)&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Entire “window” is now shifted based upon existing configured values &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Note in the above scenarios that the &lt;strong&gt;“(All Claims Providers Called)”&lt;/strong&gt; indicates that the Claims Providers registered for the Web Application / Site are then called; any custom SPClaimProvider implementations will have the method FillClaimsForEntity called at that time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2910" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>Adding and Removing SPClaimProvider via PowerShell</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/09/adding-and-removing-spclaimprovider-via-powershell.aspx</link><pubDate>Thu, 09 Jun 2011 19:51:05 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2909</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There are really 2 ways to get a SPClaimProvider registered – 1 via a Farm Feature activation.&amp;#160; The other is via PowerShell.&amp;#160; &lt;/p&gt;  &lt;p&gt;However, the documentation on how to remove is not that clear.&lt;/p&gt;  &lt;p&gt;The following code will remove it based upon a TypeName.&amp;#160; Other identifiers can be used.&lt;/p&gt;  &lt;p&gt;In order to remove:&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;Get-SPClaimProvider | ForEach-Object { 
    Write-Host $_.TypeName
    IF ( $_.TypeName -eq &amp;quot;SimpleClaimsProvider.LVClaimsProvider&amp;quot;)
        {
            Write-Host &amp;quot;Found&amp;quot;
            $cp = $_
        }
    
    }
    
    
$cp.DisplayName

Remove-SPClaimProvider $cp&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2909" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>I want my $8.5 B back…</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/07/i-want-my-8-5-b-back.aspx</link><pubDate>Tue, 07 Jun 2011 12:41:23 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2908</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Skype reporting “some users” can’t login.&amp;#160; Odd, when you’re “some users” you can’t imagine the entire world is not feeling your pain.&lt;/p&gt;  &lt;p&gt;And numerous crashes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML1df5d777_5F00_4BD70F00.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAGHTML1df5d777" border="0" alt="SNAGHTML1df5d777" src="http://cicoria.com/cs1/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/cedarlogic/SNAGHTML1df5d777_5F00_thumb_5F00_3C53FD31.png" width="386" height="616" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2908" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Rant/default.aspx">Rant</category></item><item><title>Know what Process is calling your SPClaimProvider</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/06/know-what-process-is-calling-your-spclaimprovider.aspx</link><pubDate>Mon, 06 Jun 2011 13:55:50 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2907</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you’re writing a custom SharePoint Claims Provider (&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.claims.spclaimprovider.aspx"&gt;SPClaimProvider&lt;/a&gt;) in order to augment claims, it’s important to also understand what process is executing your specific code path.&amp;#160; In the situation where you are making calls to a DB or service endpoint you will need to understand which process actually makes that call.&lt;/p&gt;  &lt;p&gt;In situations when running in a Trusted Subsystem model, you’ll also need to &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx"&gt;RunWithElevated&lt;/a&gt; in order to have that code path execute in the context of the Windows Principal for that process.&lt;/p&gt;  &lt;p&gt;The following table illustrates for the abstract members of the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.claims.spclaimprovider.aspx"&gt;SPClaimProvider&lt;/a&gt; class when implemented and where they execute:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="460"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="171"&gt;         &lt;p&gt;Method / Property&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="79" align="center"&gt;         &lt;p align="center"&gt;Web App&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="76" align="center"&gt;SP STS&lt;/td&gt;        &lt;td valign="top" width="132" align="center"&gt;Timer, PS (Feature Activation Code)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;         &lt;p&gt;FillClaimTypes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="78" align="center"&gt;         &lt;p align="center"&gt;X&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="76" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="131" align="center"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="174"&gt;         &lt;p&gt;FillClaimValueTypes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="76" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="131" align="center"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="175"&gt;         &lt;p&gt;FillClaimsForEntity&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="131" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="176"&gt;         &lt;p&gt;FillEntityTypes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;FillHierarchy&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;FillResolve&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;FillResolve&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;FillSchema&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;FillSearch&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;Name&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;SupportsEntityInformation&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;SupportsHierarchy&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;SupportsResolve&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="130" align="center"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="177"&gt;         &lt;p&gt;SupportsSearch&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="77" align="center"&gt;X&lt;/td&gt;        &lt;td valign="top" width="75" align="center"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="131" align="center"&gt;X&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, if you have your persistence in a SQL DB, and your using Windows Authentication (and using &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx"&gt;RunWithElevated&lt;/a&gt;) you’ll need to grant (or have) to the appropriate SQL permissions; generally, I’ve just granted “datareader”.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2907" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/Federation/default.aspx">Federation</category></item><item><title>Forcing use of the same Master Page in sub-sites without Publishing</title><link>http://cicoria.com/cs1/blogs/cedarlogic/archive/2011/06/02/forcing-use-of-the-same-master-page-in-sub-sites-without-publishing.aspx</link><pubDate>Thu, 02 Jun 2011 16:19:31 GMT</pubDate><guid isPermaLink="false">29a00c46-c030-43c5-bbda-4d08b2dd4d56:2906</guid><dc:creator>cicorias</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This seems to come up a few times.&amp;#160; The following sample script in PS applies a common master page across all SPWebs in a site collection.&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;$site = Get-SPSite http://fba.contosotest.com/dv1
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = &amp;quot;/dv1/_catalogs/masterpage/custom_v4.master&amp;quot;;$_.Update() }
$site.Dispose()&lt;/pre&gt;

&lt;p&gt;Thanks to Phil Childs - &lt;a title="http://get-spscripts.com/2010/09/changing-master-page-on-sharepoint.html" href="http://get-spscripts.com/2010/09/changing-master-page-on-sharepoint.html"&gt;http://get-spscripts.com/2010/09/changing-master-page-on-sharepoint.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://cicoria.com/cs1/aggbug.aspx?PostID=2906" width="1" height="1"&gt;</description><category domain="http://cicoria.com/cs1/blogs/cedarlogic/archive/tags/SharePoint/default.aspx">SharePoint</category></item></channel></rss>
