Nov 18 2009

PDC Day 1 – Lap Around Windows Azure Notes

Category: ASP.NET, Azure, WCF, WFAdam Toth @ 9:02 am

    Session #1:

    Windows Azure Platform:

  1. Windows Azure
  2. SQL Azure
  3. AppFabric

    …plus developer tools and "Dallas"

    Azure does "Compute" "Management" and "Storage"

    SQL Azure is a relational DB as a service.

    Demo is of a tickmaster-type application that uses Azure.

    TicketDirect Architecture:

    "Compute" using Web and Worker roles to process tickets

    Using the service bus to communicate with on-premise services.

    Storage of data in SQL Azure

    Printing of tickets is offloaded to the site (i.e. venue).

    Site receives a message via service bus to print the ticket for pickup at role call

Another Demo, sample app, of basic CRUD web app.

CRUD is standard ASP.NET SqlDataSource control with SQL commands, that works with SQL Express but runs in the cloud

Demo’d using Trace.Write which writes out to the development console logger and can also write to the Azure Storage logging subsystem

Migrated to SQL Azure by just changing the connection string

Storage (BLOBs, Tables, and Queues)

NEW – Add ability to mount Azure storage as NTFS drive

Coming soon – Ability to manage VMs with admin privileges

Create snapshots of your VMs

When up-scaling, Azure will deploy your app on top of your custom VM image

SQL Azure:

Only pay for what you use

Do not worry about disaster recovery

Change a connection string an have effortless switch to SQL Azure

Sync framework to sync SQL DBs in the cloud with on-premise data

Service Bus:

Securely connect apps (on-premise with cloud)

Tunneling technology

Services bus is a middle man for communication between

Access Control:

Provides outsourcing of claims-based RESTful services

Integrates with ADFS v2

Tags: ,


Nov 18 2009

PDC Day 1 KeyNote Notes

Category: ASP.NET, SharePoint, Silverlight, Technology, WCF, WF, WPF, WinFormsAdam Toth @ 8:53 am

    Windows Azure Improvements since last year:

  1. Support PHP, CGI, Apache, other frameworks
  2. Expose very low-level programming efforts (not just .NET).
    Example was a C++ app with pointers exposed as an Azure service
  3. Identity framework (support passing tokens from federated locations i.e. onsite AD instance)

    SQL Azure Improvements since last year:

  1. Not just RESTful consumption of services anymore
  2. Works with standard TDS based tools (SQL management studio)

    Microsoft has a vision of "Three screens and a Cloud".

    The screens include:

  1. Mobile devices
  2. Desktop computers
  3. Internet connected TVs

    They can all be united by data and services in the cloud.

Public Data in the Cloud (Codename "Dallas").

Repository for public data sets that can be consumed in any number of ways (and easily by Azure)

Accessed through Microsoft PinPoint

Sign up for a CTP key

Some data includes NASA mars photos, GIS data, AP News articles

PinPoint:

Centralized marketplace for partner providers, Azure ISVs and implementers, and gateway to "Dallas" public Data.

"System Center" will plugin to Azure to monitor your Azure instances, check to meet SLAs, and enable you to scale up the Azure instances directly.

2010 will include ability to have the Azure cloud be able to establish a network connection to on-premise resources (i.e. self hosted SQL Server)

WordPress is moving to Windows Azure

Tags: , , ,


Mar 06 2009

Helper Method for ASP.NET Wizard Controls

Category: ASP.NET, TechnologyAdam Toth @ 11:38 am

I enjoy working with the ASP.NET Wizard control – it’s one of the more useful controls available, and there always seems to be a place for a wizard in the custom apps I’ve written. Over time I’ve developed a helper method that makes it easier to do non-linear jumps from step to step.

GetIndexFromStep(WizardStepBase step)

Often, in a NextButtonClick event handler for a Wizard, you need to figure out what the current step is that you are on, based on the WizardNavigationEventArgs e.CurrentStepIndex property. Here is a helper method to enable you to do that:

/// <summary>
/// Returns the index of a particular wizard step in the WizardSteps collection
/// </summary>
/// <param name="step">The step whose index number you want</param>
/// <returns></returns>
private int GetIndexFromStep(WizardStepBase step)
{
    return step.Wizard.WizardSteps.IndexOf(step);
}

You can also package it up as an extension method (.NET 3.5) off of the Wizard or WizardStepBase object:

using System.Web.UI.WebControls;
 
/// <summary>
/// Extensions for ASP.NET Wizard Control Objects
/// </summary>
public static class WizardExtensions
{
    
    /// <summary>
    /// Gets the index of a particular wizard step.
    /// </summary>
    /// <param name="wizard">The current Wizard</param>
    /// <param name="step">The step whose index number you want</param>
    /// <returns></returns>
    public static int GetIndexFromStep(this Wizard wizard, WizardStepBase step)
    {
        return wizard.WizardSteps.IndexOf(step);
    }
    /// <summary>
    /// Gets the index of this wizard step.
    /// </summary>
    /// <param name="step">This step</param>
    /// <returns></returns>
    public static int GetIndex(this WizardStepBase step)
    {
        return step.Wizard.WizardSteps.IndexOf(step);
    }
}

If you’ve given your wizard steps specific IDs, then you can use them strongly typed in a NextButtonClick event:

protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
{
    if (e.CurrentStepIndex == GetIndexFromStep(step1))
    {
        // We are on step #1
 
        // Validate...
 
        // Skip to step 3
        Wizard1.ActiveStepIndex = GetIndexFromStep(step3);
 
    }
}

Tags: ,


Oct 03 2007

Apostrophes in Community Server

Category: ASP.NET, TechnologyAdam Toth @ 11:15 pm

I noticed that the RSS feed for this blog had a screwed up blog title because of the apostrophe in it. It seems that community server is htmlencoding the blog title, and that is getting passed through to the RSS feed as “& # 3 9 ;”. This was supposed to be fixed in a service pack, but doesn’t seem to have made it in yet on this particular blog.
In the meantime, I found a workaround. Open your Windows Character Map, and choose the following character:

Select it, copy it, and paste it into the text box for your blog title. It’s a good substitute, and doesn’t get encoded. I’m not sure if the same problem exists for post titles, so this workaround may be applicable to those as well.

UPDATE: I’ve now moved on and am using a WordPress blog.

Tags: