November, 2009

  • Cloudy in Seattle

    Using the Sample Windows Azure ASP.NET Providers

    • 14 Comments

    Previously, the sample Windows Azure ASP.NET providers were included in the samples folder that was installed with the SDK.

    As of the November 2009 release of the Windows Azure Tools & SDK, this is no longer the case.  The samples are available online at http://code.msdn.microsoft.com/windowsazuresamples.

    To use these samples:

    1. Download the samples and unzip (These are no longer included as part of the samples installed to the SDK folder)

    2. Add the AspProviders/Lib/AspProviders.csproj project to the solution by right clicking on the solution and selecting Add | Existing Project… and navigating to the AspProviders.csproj file.

    3. Add a reference from your ASP.NET MVC 2 Web role to the AspProviders sample library by right clicking on the “references” folder in the ASP.NET MVC project and selecting “Add Reference…”

    image

    and selecting the AspProviders assembly:

    image

    4. Open the web.config file and add/change the providers. 

    You can set the applicationName appropriately for your application. 

    These sections are added under the system.web element. Note that I'm still tracking down some issues I'm seeing with the profile provider, will update this post when I know more.

    Membership Provider:

        <membership defaultProvider="TableStorageMembershipProvider" userIsOnlineTimeWindow = "20">
          <providers>
            <clear/>
    
            <add name="TableStorageMembershipProvider"
                 type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageMembershipProvider"
                 description="Membership provider using table storage"
                 applicationName="AspProvidersDemo"
                 enablePasswordRetrieval="false"
                 enablePasswordReset="true"
                 requiresQuestionAndAnswer="false"
                 minRequiredPasswordLength="1"
                 minRequiredNonalphanumericCharacters="0"
                 requiresUniqueEmail="true"
                 passwordFormat="Hashed"
                    />
    
          </providers>
        </membership>
    

    Role Manager Provider:

      <roleManager enabled="true" defaultProvider="TableStorageRoleProvider" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="30"
                     cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration = "true"
                     cookieProtection="All" >
          <providers>
            <clear/>
            <add name="TableStorageRoleProvider"
                 type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageRoleProvider"
                 description="Role provider using table storage"
                 applicationName="AspProvidersDemo"
                    />
          </providers>
        </roleManager>
    

    Session State Provider:

            <sessionState mode="Custom" customProvider="TableStorageSessionStateProvider">
                <providers>
                    <clear />
                    <add name="TableStorageSessionStateProvider"
                         type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider"
                         applicationName="AspProvidersDemo"
                 />
                </providers>
            </sessionState>
    

    Change the existing appSettings element and the folllowing provider configuration:

      <appSettings>
        <add key = "TableStorageEndpoint" value="http://127.0.0.1:10002/devstoreaccount1"/>
        <add key = "BlobStorageEndpoint" value="http://127.0.0.1:10000/devstoreaccount1"/>
        <add key = "AccountName" value="devstoreaccount1"/>
        <add key = "AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="/>
    
        <!-- provider configuration -->
        <!-- When using the local development table storage service only the default values given
         below will work for the tables (Membership, Roles and Sessions) since these are the names
         of the properties on the DataServiceContext class -->
        <add key = "DefaultMembershipTableName" value="Membership"/>
        <add key = "DefaultRoleTableName" value="Roles"/>
        <add key = "DefaultSessionTableName" value="Sessions"/>
        <add key = "DefaultProviderApplicationName" value="ProviderTest"/>
        <add key = "DefaultProfileContainerName"/>
        <add key = "DefaultSessionContainerName"/>
      </appSettings>
    
    

    You can now remove the “ApplicationServices” connection string as all of the providers that referenced it are gone.

    6. Hit F5 to debug the application and your application is now using the sample ASP.NET providers that run against Windows Azure storage!

    What’s next?  You can bet that we’ll put some more work into these providers to make them better and potentially even provide them as a real library. 

    Stay tuned.

  • Cloudy in Seattle

    Setting Up SQL Server Management Studio with SQL Server Express 2008 Installed

    • 11 Comments

    One of the things I’ve been playing with lately is SQL Azure.  I’ll post about my experience using Windows Azure and SQL Azure together shortly, this post is all about setting up SQL Server Management Studio (SSMS) with SQL Server Express 2008.

    In order to use SSMS with SQL Azure, you need to have the 2008 version of SSMS installed.  I had the 2005 version and it failed to connect.

    The reason I’m posting about this is that I ran into a few non obvious things.  Now the thing is, I’m not that savvy with SQL Server and I’m sure that contributed to my confusion.  On the other hand, I figure other folks may be in my situation and could find this to be useful – if I can save a couple of people’s time, then I’m happy :)

    From what I understand, because there are so many different SQL Server installs and because how you install SQL Server can also impact how you can add or even if you need to add SSMS, this set of instructions is far from complete. 

    If my scenario below is different for you, I found a lot of good information in the comments of this article.  You just have to sort through them and figure out what all the options/dialogs everyone is talking about.

    Back to my scenario -- I specifically had SQL Server Express installed through my Visual Studio installation and I wanted to add SSMS.

    There are two ways I can get SSMS for SQL Server Express 2008, one is with a download  of SQL Server 2008 Express that includes SSMS, the other is through the standalone installer.

    Because i already had SQL Server Express 2008 installed, I downloaded and ran the standalone installer.  Upon running, I received this dialog:

    image

    Which scared me into thinking that I didn’t have SP1 of SQL Server installed.  Turned out I had so I could safely ignore this dialog.  Key point here is not to let this dialog mislead you.

    Upon hitting “Run”, I was brought to the SQL Server Installation Center:

    image

    Again I’ll remind you that I’m not much of a SQL Server guy, so I really had no idea what to do next.  I expected to just click next through a bunch of installer screens then go to my start menu and find SSMS – so what is this I see?

    After some experimentation and trial and error (too much trial and error in fact), I found I needed to click the “Installation” link on the left then click the “New SQL Server stand-alone installation or add features to an existing installation” link.

    image

    Great, after hitting next through some setup files, a rule check and a EULA, I was brought to the following dialog:

    image

    Here I initially chose to “add features” – seems like that would make sense but it turned out to be a dead end. 

    I went back to “Perform a new installation of SQL Server 2008” and that led me to the next screen which allowed me to select “Management Tools – Basic”.  This is the one you want to select. (it’s already selected in the screen shot below because SSMS was installed at the time of this screen shot).

    image

    After clicking through the remaining dialog, I was happy to see SSMS under my start menu, Microsoft SQL Server 2008 folder.

    image

    Now I can connect to SQL Azure through the Query editor (not the connect dialog that comes up when you start SSMS or from the object explorer).  Only a connection from the Query Editor is supported. (a later version of SSMS, for SQL Server 2008 R2 is coming that will support SQL Azure)

    image 

    More to come on my SQL Azure + Windows Azure experience soon.

    Hope this was helpful for someone.

  • Cloudy in Seattle

    ASP.NET MVC and Windows Azure (November 2009 edition)

    • 7 Comments

    With the November release of the Windows Azure Tools for Microsoft Visual Studio, we’ve done some things in Visual Studio 2010 to make it easier to use ASP.NET MVC and Windows Azure together.

    Note:  In the November release of the Tools + SDK, Windows Azure only supports .NET 3.5 SP1, .NET 4.0 projects are not supported.

    Creating a New Project

    The first thing you’ll notice in Visual Studio 2010 is that we now have a project template option for an ASP.NET MVC 2 Web Role.  (Click on File | New | Project… | Windows Azure Cloud Service)

    Note: To use ASP.NET MVC and Windows Azure together on Visual Studio 2008 – please follow the steps under “Using an Existing Project”.

    clip_image002

    This makes it easy to create a new ASP.NET MVC project in the context of a cloud service.  This is available in Visual Studio 2010 and Visual Web Developer 2010 Express.

    The differences between an ASP.NET MVC Web Role and a regular ASP.NET MVC project are the following:

    1) Windows Azure specific references to the diagnostics library, runtime and storage client.

    clip_image004

    2) Setting the CopyLocal property of the System.Web.Mvc reference to true to ensure that it gets copied up to the cloud which will not have it by default.

    clip_image006

    3) Web.config is modified to add a Windows Azure specific TraceListener (Microsoft.WindowsAzure.Diagnostics.DiagnosticsMonitorTraceListener)

    4) WebRole.cs file that includes template code to bootstrap the logging and diagnostics infrastructure as well as a default behavior for handling configuration changes.

    Aside from that, the project is the same as any ASP.NET MVC project that you would create outside the context of a Windows Azure cloud service.

    Using an Existing Project

    To use an existing ASP.NET MVC project, simply add it to the solution as an existing project.  This is also how you would use ASP.NET MVC Projects (or any existing ASP.NET Web Application project) on VS 2008.

    Note:  In the November release of the Tools + SDK, Windows Azure only supports .NET 3.5 SP1, .NET 4.0 projects are not supported.  If you are adding a project that target .NET Framework 4.0, please change the target framework in the project properties to us the .NET Framework 3.5.

    clip_image008

    Right click on the Roles node in the Cloud Service project and select Add | Web Role Project in Solution…

    clip_image010

    The select the project you just added.

    clip_image012

    Your existing MVC is now associated as a web role.  The changes that were made above automatically to the project (adding references, startup code, CopyLocal=true and web.config trace listener change) you will have to do manually to get that functionality.

    Using ASP.NET Providers

    The default ASP.NET MVC project template makes use of ASP.NET providers: Membership, role and profile and rely on SQL Server.  You have two choices on reworking these providers, either use SQL Azure or use the Windows Azure sample providers that use Windows Azure storage.

    Because ASP.NET will setup SQL Express automatically for the providers, if you don’t migrate your providers to use one of the cloud data options, you will find that the providers just work when running on the local development fabric but will then fail when running on the cloud where a local SQL Server instance is not available.

    To convert your project to use the Windows Azure Storage based sample implementation of the ASP.NET providers see this post: http://bit.ly/1M1HSN

    Currently the existing aspnet_regsql.exe tool and the ASP.NET functionality to generate the database for the providers does not work with SQL Azure.  We have some scripts coming that will workaround the problem.  I’ll update this post when those become available.  [Update:  these scripts are now available, please see: http://blogs.msdn.com/jnak/archive/2009/11/24/asp-net-provider-scripts-for-sql-azure.aspx]

    Known Issues

    There are two known issues with using ASP.NET MVC and Windows Azure Tools:

    1) Creating a unit tests with the Visual Basic version of ASP.NET MVC results in a unit test project that fails to build.  This is because the Windows Azure Tools creates the projects as .NET 3.5 projects.  The workaround is to not create a unit test project.  This will be resolved in the RTM version of Visual Studio. Note: this is not an issue with Visual C#.

    2) Creating an ASP.NET MVC Web Role on Visual Web Developer 2010 Express results in a project that fails to build:

    Error 1 The type name 'MembershipCreateStatus' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly. c:\users\vslab2\documents\visual studio 2010\Projects\CloudService7

                    The workaround is to set the Target framework of the MVC project to .NET Framework 3.5.

  • Cloudy in Seattle

    Videos of the Windows Azure Sessions at PDC09

    • 5 Comments

    Here are the videos of the Windows Azure sessions at PDC09.  Lots of useful content, the sessions were well attended and well received.

    At the time of this writing, some of the videos are not yet posted but they will be by the end of the week.

    Enjoy.

    Windows Azure Sessions

    My session -- Tips and Tricks for Using Visual Studio 2010 to Build Applications that Run on Windows Azure

    Introductory

    Learn to Develop for Windows Azure

    Windows Azure Storage

    Windows Azure as an Open Platform

    SQL Azure Sessions

    Showcases

  • Cloudy in Seattle

    ASP.NET Provider Scripts for SQL Azure

    • 4 Comments

    If you want to use the ASP.NET Providers (membership, role, personalization, profile, web event provider) with SQL Azure, you'll need to use the the following scripts or aspnet-regAzure.exe tool to setup the database: http://support.microsoft.com/default.aspx/kb/2006191

    Currently the only provider which is not supported on SQL Azure is the session state provider.

    Personally, I like using SSMS 2008 R2 to connect to SQL Azure and using the Query window to run the scripts. (if you already have SSMS 2008 installed, you can use that as well, just connect from the Query window itself, not the Object Explorer as that will fail)

    Note: I use SQL Server Authentication with the following credentials:

    • Server name: <servername>.database.windows.net
    • Login: <username>@<servername>)
  • Cloudy in Seattle

    Tips and Tricks for Visual Studio + Windows Azure at PDC ‘09

    • 2 Comments

    For those of you that will be attending PDC, I wanted to let you know about a session I’ll be doing on using Visual Studio 2010 to develop applications that run on Windows Azure.

    The session will share a number of tips and tricks and show some cool new tools in Visual Studio for Windows Azure and SQL Azure.

    The tips and tricks will be presented in the context of 2 walkthroughs:

    1. Creating a new cloud service application
    2. Migrating an existing ASP.NET Web Application to Windows Azure and SQL Azure

    With this format I hope to make the session interesting and useful for developers that are new to Windows Azure as well as those who have been using Windows Azure for a while and want to learn some neat tricks and tips and some “under the hood” aspects of the tools.

    Hope to see you there!  Wednesday at 1:30 PM in 515A

    http://microsoftpdc.com/Sessions/SVC53 

    A platform is only as powerful as the tools that let you build applications for it. This session focuses on using demos, not slides, to show the best way to use Visual Studio 2010 to develop Windows Azure applications. Learn tips, tricks and solutions to common problems when creating or moving an existing application to run on Windows Azure. Come see how Visual Studio 2010 supports all parts of the development cycle as we show how to take an ASP.NET application running on IIS and make it a scalable cloud application running on Windows Azure.

    PDC09Bling_Speaker_ImA_240

  • Cloudy in Seattle

    November 2009 Release of the Windows Azure Tools and SDK

    • 1 Comments

    Today we released several new features for Windows Azure through the Windows Azure Tools and SDK.  (Use the direct link while the release propagates)

    We look forward to discussing these new Windows Azure features, in detail, at PDC '09.

    This release add support for Visual Studio 2010 Beta 2 and VWD Express 2010 Beta 2.

    Lots of changes and new features in the November 2009 release:

    • Service Model UI: A redesigned and significantly more complete interface for manipulating Role configuration information. To access, double-click on a role node in the Solution Explorer.
    • Additional role templates: Support for ASP.NET MVC 2 (2010 only), F# worker roles (2010 only), and WCF Service Application web roles.
    • Support for dynamically creating tables: The Create Tables functionality is now performed automatically; there is no longer a need to right-click and select Create Tables… on the project after your table definitions have changed.
    • Full support for and installation of the November Windows Azure SDK release:
      • The sample storage client has been replaced by a new production quality library.
      • New Diagnostics library enables logging using .NET APIs and enables the collection of diagnostic information from the service.
      • Service Runtime library updated to support inter-role communication and notification of configuration changes .
      • Support for input endpoints on Worker Roles.
      • Higher fidelity simulation of Development Storage: supports all current cloud storage features, including dynamically creating tables.
      • Ability to choose the size of the VM for a role instance.
      • Ability to persist data in local storage even after the role is recycled.
      • Ability to manage certificates to install to the role VMs.

    Updated and additional samples are available at: http://code.msdn.microsoft.com/windowsazuresamples

    I’m pretty excited about this for a few reasons. 

    • We've been working really hard on it for quite a while now and it feels so good to see it go live. 
    • As you can see from the list above, we’ve packed it full of new things that you’ve been asking for!
    • You can now use Visual Studio 2010 Beta 2 with the Windows Azure Tools
    • I have a ton of things to blog about :) (including updating some of my walkthroughs to work against this new release)

    Let me know what you think!

  • Cloudy in Seattle

    3 Short Videos - Introduction to Windows Azure Tools for Microsoft Visual Studio 2010

    • 0 Comments

     [Update 2/10/2010 - These videos moved so I needed to update the links.]

    Straight from the halls of Microsoft - a 3 video series on building Windows Azure applications using Visual Studio 2010 Beta 2.  The videos showcase the Windows Azure Tools.

    The goal was to focus on the developer experiences and to keep the videos relatively short (around 10 minutes each) so that they are easily consumed.

    Part 1: Windows Azure: Getting the Tools, Creating a Project, Creating Roles and Configuration (14 minutes, 26 seconds)

    Windows Azure: Getting the Tools, Creating a Project, Creating Roles and Configuration

    Part 2: Running and Debugging a Windows Azure Application Locally with Visual Studio (6 minutes, 11 seconds)

    Running and Debugging a Windows Azure Application Locally with Visual Studio

    Part 3: Deploying Windows Azure Applications from Visual Studio  (6 minutes, 56 seconds)

    Deploying Windows Azure Applications from Visual Studio

  • Cloudy in Seattle

    Tools to Configure Windows Azure Service Definition and Configuration Files

    • 0 Comments

    One of the features we added to the November 2009 release of the Windows Azure Tools are tools to configure the Service Definition and Service Configuration files – yes, no more XML editing!

    To access the “Service Model Configuration Pages”, right click on the role under the Cloud Service “Roles” node in Solution Explorer and select “Properties”. (you can also double click the role)

    image

    This will bring up our UI over the definition and configuration files:

    image

    Here are a few more screen shots.

    Settings, including being able to create connection strings:

    image

    Endpoints for web roles:

    image

    Endpoints for Worker Roles – more flexible than web roles:

    image

    Local Storage:

    image

    Certificate management.  Declare the install of certificates in the VMs for the role that is being configured.  The certificates need to be uploaded separately through the Windows Azure Developer Portal.

    image

  • Cloudy in Seattle

    Windows Azure Platform TCO/ROI Analysis Tool

    • 0 Comments

    We just released a tool to help you figure out how much money you can save by switching to Windows Azure.  It’s quite comprehensive and I’m sure will be quite useful for a lot folks.

    http://www.microsoft.com/windowsazure/tco/

    To give you a really rough idea of what this looks like:

    image

  • Cloudy in Seattle

    Couple neat Windows Azure Storage related announcements

    • 0 Comments

    In case you missed this on the Windows Azure blog, there were a couple of neat announcements around new storage features:

    Content Delivery Network: http://blogs.msdn.com/windowsazure/archive/2009/11/05/introducing-the-windows-azure-content-delivery-network.aspx

    Windows Azure CDN has 18 locations globally (United States, Europe, Asia, Australia and South America) and continues to expand. Windows Azure CDN caches your Windows Azure blobs at strategically placed locations to provide maximum bandwidth for delivering your content to users. You can enable CDN delivery for any storage account via the Windows Azure Developer Portal. The CDN provides edge delivery only to blobs that are in public blob containers, which are available for anonymous access.

    The benefit of using a CDN is better performance and user experience for users who are farther from the source of the content stored in the Windows Azure Blob service. In addition, Windows Azure CDN provides worldwide high-bandwidth access to serve content for popular events.

    Custom Storage Domain Names: http://blogs.msdn.com/windowsazure/archive/2009/11/05/accessing-windows-azure-blobs-using-custom-storage-domain-names.aspx

    The custom storage domain name feature allows you to register a custom domain name for a given storage account for anonymous blob access using that domain name. Currently we provide access to blob storage using the following domain name:

    http://<account>.blob.core.windows.net/<container>/<blobname>

    But if I owned a domain called “toddlers.wingtiptoys.com”, I may instead want my blobs accessible via:

    http://toddlers.wingtiptoys.com/<container>/<blobname>

    I'm really excited about both features as they are just so important in terms of allowing our customers to build professional and high performance web sites. 

    In the case of CDN, it allows you to leverage Microsoft's content delivery capabilities for your own web sites - how cool is that?

  • Cloudy in Seattle

    Tips and Tricks for Using Visual Studio 2010 to Build Applications that Run on Windows Azure

    • 0 Comments

    Thanks to everyone who attended my session at PDC today.  I really hope that you took something useful away from it.

    As mentioned in the session, I’m posting the set of tips that were covered. 

    You can now view the session online at: http://microsoftpdc.com/Sessions/SVC53

    If you missed my session, I went through a "green field" new Windows Azure Cloud Service project developer scenario as well as a "brown field" moving an existing ASP.NET web application to run on Windows Azure developer scenario. 

    Through the context of those two walkthroughs, I covered the following Tips and Tricks.

    Tips for Getting Started

    1. The Web Platform Installer automates a number of the steps to install the Windows Azure Tools for VS 2008 or to install IIS prior to installing the Windows Azure Tools for VS 2010.

    2. Get the patches - http://msdn.microsoft.com/en-us/azure/cc974146.aspx

    3. Name your projects before creating them.  When you add roles to your cloud service solution, it is much easier to rename them at that stage, then after the solution and projects have been created.

    clip_image002

    The reason is that even though you can use the Solution Explorer to rename the projects after creation, the folders where those projects reside will not be renamed.

    4. Include the Static Content module and register the Silverlight mime type in IIS – I actually didn’t mention this one (on purpose) in my session as it fell below the cut line but the development fabric uses IIS under the hood and every so often we run into folks that get unexpected results when they run their apps on IIS because they are used to running them on the ASP.NET Development Server.

    To enable the static content module: See tip #1 above (use WebPI) or see this article http://technet.microsoft.com/en-us/library/cc732612(WS.10).aspx

    To register the xap mime type (typically only needed for older OSs):

    1. Open Internet Information Services (IIS) Configuration Manager and select the server to manage (usually the top-level item on the left side)
    2. Double-click MIME Types on the right side
    3. Add an entry to map the .xap extension to the application/x-silverlight-app MIME type

    If you are using WCF, don’t forget to install the WCF Activation Windows feature – Control Panel | Programs | Turn Windows features on or off | Microsoft .NET Framework 3.5.1 | Windows Communication foundation HTTP Activation

    Tips During Development

    5. Always keep the Cloud Service project as the StartUp project to get the desired Run/Debug on the development fabric behavior.

    5. Know the 3 differences between web roles and web application projects.  The 3 differences are:

    • References to the Windows Azure specific assemblies: Microsoft.WindowsAzure.Diagnostics, Microsoft.WindowsAzure.ServiceRuntime, and Microsoft.WindowsAzure.StorageClient
    • Bootstrap code in the WebRole.cs/vb file that starts the DiagnosticMonitor as well as defines a default behavior of recycling the role when a configuration setting change occurs.
    • The addition of a trace listener in the web.config file: Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener.

    6. In general, WCF works correctly on Windows Azure.  There is a problem using "add service reference" or svcutil but we have a patch to workaround the problem.  The patch is installed in the cloud, and more information about this is here: http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues (not that a web.config change is also required)

    7. Use the tools to configure the UI.  Click on a role under the “Roles” node in Solution Explorer and select “Properties”.

    image

    This will bring up a UI over the Service Definition and Service Configuration file sections for that selected Role:

    image 

    8. Each role instance is run in a process, all role process are attached to the debugger

    • Web Roles run in WaWebHost.exe, one process per instance
    • Worker Roles run in WaWorkerHost.exe, one process per instance

    image

    When debugging, Visual Studio will attach to all of those processes as well as your web browser to enable debugging across roles and across instances. 

    You can correlate the role instance you are debugging to the instance in the development fabric by looking at the log messages and matching the PID.  You can also right click and attach to the debugger from the development fabric and the subsequent dialog also shows the PID.

    These processes in the Cloud will be 64-bit processes running on 64 bit Windows.  Keep that in mind especially if you are calling native methods through pinvoke.

    9. Project settings for debugging in role projects are read when running on the development fabric – Although we don’t read all of the values, we do pay attention to the project properties debuggers settings.  For example on a web application project | project properties | Web tab, you can configure whether you want to to Native Code debugging, or Silverlight debugging.

    image

    10. Add multiple cloud service projects to the solution - you can use different cloud service projects to manage different configuration/definition files and different role configurations.

    Tips for Migration

    The NerdDinner sample code can be found at: http://nerddinner.codeplex.com/

    10. Use an existing web application project as a web role

    clip_image002[5]

    Right click on the Roles node in the Cloud Service project and select Add | Web Role Project in Solution…

    clip_image004

    The select the project you just added.

    clip_image006

    Then refer to tip #5 above (know the differences between an ASP.NET Web App project and a Web Role project) and selectively add references, trace listener and startup code as desired.

    11. ASP.NET Provider scripts for SQL Azure

    To use the ASP.NET providers with SQL Azure, you can use these scripts: http://support.microsoft.com/default.aspx/kb/2006191 to setup the database.

    12. Know what Visual Studio tools work with SQL Azure. 

    Use SQL Server Management Studio 2008 R2 CTP3 (November) to connect to SQL Azure. (SSMS 2005 is not compatible and SSMS 2008 only support SQL Azure from the Query window)

    Tips for Deployment

    13. Test your app on the local development fabric with cloud storage.  There are two reasons to do this:

    • Deploying your application to the cloud in stages makes it much easier to diagnose any issues you encounter.  Being able to debug the app locally while you move the data to the cloud will help you flush out a number of issues
    • When your application is running in the cloud, run additional roles locally to debug issues that are related to production data that would otherwise be difficult to reproduce locally or hard to debug in the cloud.

    14. Crack the Service Package using the _CSPACK_FORCE_NOENCRYPT_ environment variable. See this post for more information.

    15. Use the Service Management APIs and Powershell cmdlets to automate deployment.  See this post for more information.

    The script I used to deploy the service was:

    $cert = Get-Item cert:\CurrentUser\My\<enter cert>
    $sub = "<enter subscription ID>"
    $servicename = <enter service name>'
    $package = "<enter url to service package in blob storage>"
    $config = "<enter path to service configuration file>"

    Add-PSSnapin AzureManagementToolsSnapIn

    Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub |
        New-Deployment Staging $package $config -Label 'PDC09Staging' |
        Get-OperationStatus –WaitToComplete

    Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub |
        Get-Deployment -Slot Staging |
        Set-DeploymentStatus 'Running' |
        Get-OperationStatus -WaitToComplete

    csmanage (tool that exercises the Service Management APIs) and other samples that aren't included in the Windows Azure SDK can be found here: http://code.msdn.microsoft.com/windowsazuresamples

  • Cloudy in Seattle

    Add and Vote for Windows Azure Features

    • 0 Comments

    [Changing title to be more clear]

    Mike Wickstrand, the director of Windows Azure product planning has put together a site where you can post and vote for Windows Azure ideas: http://www.mygreatwindowsazureidea.com

    The idea came from the success we had with the Silverlight feature suggestions page and we hope to duplicate that success.

    Please take the time to go to http://www.mygreatwindowsazureidea.com/ today submit your ideas and your votes - and don't forget about the areas that are my passion - the developer experiences and tools.

  • Cloudy in Seattle

    Web Site Projects and Windows Azure

    • 0 Comments

    Currently (November 2009), the Windows Azure Tools for Visual Studio only support Web Application projects – the type of Web projects that have a project file and are compiled.

    For most folks, they reason to choose a Web Site project was for the ability to update it easily on the server and generally, the target customer for Windows Azure is typically using a Web Application project. (for a good article about the differences and when to use each one, please see this post)

    Because Windows Azure has a deployment model where you can’t update the files on the server itself and considering the target customer, this seemed like a reasonable approach.

    That said, there are a lot of apps out there that are in the Web Site format that folks want to deploy to Windows Azure and we’re figuring out the best way to support this moving forward.

    For the time being, most folks are doing the conversion from Web Site to Web Application project and I wanted to point to a good post off the Visual Web Developer blog that will help make this easier: http://blogs.msdn.com/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx

Page 1 of 1 (14 items)