December 2008 - Posts - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

News

Please goy buy 3-4 copies of my book on MonoTouch titled "Professional Android Programming with Mono for Android for .NET/C# Developers." They make great gifts all year round. Plus, I get about $.25 when you buy a copy.

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? iPhone, Android, MonoTouch, MonoDroid, Mobile, HTML5, .NET, ADO.NET, ASP.NET, AJAX, jQuery, jQuery Mobile, ASP.NET AJAX, and Windows Azure............follow me on twitter at Wally

December 2008 - Posts

  • Windows Azure Queues - Message Leasing

    I was asked about this at the MDC in Atlanta. How do multiple instances of services not pickup the same messages when checking a single queue. According to the documentation that I have read, once a message is read, the service has 30 seconds(by default) to remove the message from the queue. If the service removes the message than everything is golden. If the service does not remove the message from the queue, than the message is put back into the queue. This is referred to as leasing in the documentation.
  • Twitter "discussions"

    I stumbled into a discussion on twitter this evening. It involved a religious discussion concerning ORMs vs. directly querying the database. While the subject may/may not interest you, the discussion was rather interesting. Twitter has a limit of 140 characters per posting (tweet). As a result, I think that has limited discussions, none of that "Jane your ignorant ***" type of talk.
  • SVN for Windows

    Yeah, I tried TFS. I guess I am a loser because I couldn't make it work.  I tried SVN for Windows Server and it just worked.  I'm using SVN now.

  • ASP.NET Providers with Windows Azure

    Are you trying to get the ASP.NET Provider code working in a separate application with Windows Azure?  If so, check out this item from the read me file:

    • Make sure that the Table Storage service is running in development storage. Also make sure that the database called 'ServiceHostingSDKSamples' is currently selected for the table service; choose Development Storage -> Tools -> Table service properties -> ServiceHostingSDKSamples. 

    I missed this and got the error message below:

    <?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>
    <error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">
    <code></code>
    <message xml:lang=\"en-US\">Attempt to create table 'Sessions' failed. Creating a new table dynamically is not supported in development storage</message>
    </error>

    I sure hope that this changes  in the future.  I'd like some way to have the asp.net membership "stuff" setup for me, like with .net 2.x.

  • ASP.NET 3.5 Service Pack 1 Wrox Blox

    My eBook ASP.NET 3.5 Service Pack 1 Wrox Blox is now for sale.  Please buy 3 or 4 copies for the ones you love.

    Seriously, there is a lot of good solid material on the new features, especially AJAX History, Routing, and other new features.  Please check it out.
  • Some interesting things I am finding about Windows Azure

    • Queue messages have a max size of 8kb.
    • Queued messages in azure are typed.
    • If you are interested in #Azure, I would suggest following @smarx on twitter.com.
    • Transaction support will come in future #Azure CTPs.
    • ACID Transactions are only supported on single entity updates at this time in azure.
    • Azure table writes are synchronous.
    • In the commercial release, MS will offer some control over geodistribution and georeplication. Info is scarce at this time.
    • In the CTP, Azure runs in "a single datacenter on the US west coast."
    • The lease timeframe appears to be configurable. The default is 30 seconds.
    • You can hold a lease on message in an azure queue. No one else can see it during the lease. This is good.

    These are just some of the things I have found while reading online.  As I find out more, I'll be posting. If you want immediate access to my info, go to twitter.com and follow me (@wbm)

  • ASP.NET Podcast Show #133 - Windows Azure Table Storage - video

     

    Subscribe to All!

    Subscribe to WMV.

    Subscribe to M4V (iPod).

    Subscribe to MP3.

    Download WMV.

    Download M4V (iPod).

    Download MP3.

    Win a ticket to the MDC in Detroit.  Enter here. 

    Original Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/12/25/asp-net-podcast-show-133-windows-azure-table-storage-video.aspx

    Show Notes:

    • CRUD Application
    • CRUD application.
    • Message.
    • Message Data Service Context.
    • This example is taken from Hands On Labs.

    Source Code for Default.aspx.cs:

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Data.Services.Client;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using Microsoft.Samples.ServiceHosting.StorageClient;
    using Microsoft.ServiceHosting.ServiceRuntime;

    namespace TableCloudService_WebRole
    {
        public partial class _Default : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                string statusMessage = String.Empty;
                if (!Page.IsPostBack)
                {
                    DisplayMessages();
                }
            }

            protected void lbDisplayMessages_Click(object sender, EventArgs e)
            {
                DisplayMessages();
            }

            protected void OnDeleteMessage(object sender, CommandEventArgs e)
            {
                LinkButton lb = (LinkButton)sender;
                GridViewRow gvr = (GridViewRow)lb.Parent.Parent;

                if (e.CommandName == "Delete")
                {
                    string PartitionKey = ((HiddenField)gvr.FindControl("hdPartitionKey")).Value;
                    string RowKey = ((HiddenField)gvr.FindControl("hdRowKey")).Value;
                    string TimeStamp = ((HiddenField)gvr.FindControl("hdTimeStamp")).Value;
                    string Body = ((TextBox)gvr.FindControl("txtBody")).Text;
                    string Name = ((TextBox)gvr.FindControl("txtName")).Text;
                    MessageDataServiceContext context = GetContext();

                    //var m = (from mess in context.Messages
                    //         where
                    //             (mess.PartitionKey == PartitionKey) &&
                    //             (mess.RowKey == RowKey)
                    //         select mess).Single();
                    var m = new Message();
                    m.PartitionKey = PartitionKey;
                    m.RowKey = RowKey;
                    m.Timestamp = Convert.ToDateTime(TimeStamp);
                    context.AttachTo("Messages", m, "*");
                   
                    context.DeleteMessage(m);
                    RoleManager.WriteToLog("Verbose", "Delete Message.");
                    DisplayMessages();
                }
            }
            protected void OnUpdateMessage(Object sender, CommandEventArgs e)
            {
                LinkButton lb = (LinkButton)sender;
                GridViewRow gvr = (GridViewRow)lb.Parent.Parent;

                if (e.CommandName == "Update")
                {
                    string PartitionKey = ((HiddenField)gvr.FindControl("hdPartitionKey")).Value;
                    string RowKey = ((HiddenField)gvr.FindControl("hdRowKey")).Value; ;
                    string TimeStamp = ((HiddenField)gvr.FindControl("hdTimeStamp")).Value; ;
                    string Body = ((TextBox)gvr.FindControl("txtBody")).Text; ;
                    string Name = ((TextBox)gvr.FindControl("txtName")).Text; ;
                    MessageDataServiceContext context = GetContext();

                    //var m = (from mess in context.Messages
                    //         where
                    //             (mess.PartitionKey == PartitionKey) &&
                    //             (mess.RowKey == RowKey)
                    //         select mess).First();
                    var m = new Message();
                    m.PartitionKey = PartitionKey;
                    m.RowKey = RowKey;
                    m.Timestamp = Convert.ToDateTime(TimeStamp);
                    m.Body = Body;
                    m.Name = Name;
                    context.AttachTo("Messages", m, "*");
                    context.UpdateMessage(m);
                    RoleManager.WriteToLog("Information",  "Update complete.");
                    DisplayMessages();
                }
            }

            protected void Timer1_OnTick(Object sender, EventArgs e)
            {
                DisplayMessages();
            }

            private void DisplayMessages()
            {
                MessageDataServiceContext context = GetContext();
                RoleManager.WriteToLog("Verbose", "Display Messages.");
                messageList.DataSource = context.Messages.Take(10);
                messageList.DataBind();
            }

            private MessageDataServiceContext GetContext()
            {
                MessageDataServiceContext context;
                StorageAccountInfo accountInfo = StorageAccountInfo.GetAccountInfoFromConfiguration("TableStorageEndpoint");
                TableStorage.CreateTablesFromModel(typeof(MessageDataServiceContext), accountInfo);
                context = new MessageDataServiceContext(accountInfo);
                RoleManager.WriteToLog("Verbose", "Message Data Service Context created.");
                return context;
            }

            protected void SubmitButton_Click(object sender, EventArgs e)
            {
                StorageAccountInfo accountInfo = StorageAccountInfo.GetAccountInfoFromConfiguration("TableStorageEndpoint");
                MessageDataServiceContext context = new MessageDataServiceContext(accountInfo);
                context.AddMessage(this.nameBox.Text, this.messageBox.Text);
                nameBox.Text = String.Empty;
                messageBox.Text = String.Empty;
                DisplayMessages();
            }
        }
    }

    Source Code for Default.aspx:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TableCloudService_WebRole._Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Azure Table Example Page</title>
            <style type="text/css">
            body { font-family: Verdana; font-size: 9pt; }
            h1 { font-size: 12pt; color: #555555; }
            li { list-style-type: none; }
            form { background-color: #eeeeff; width: 80%; margin: 0 auto; padding: 1em; border: solid 1px #333333; }
            #entryform, #messages { margin: 1em 0 }
            #entryform li span { float: left; width: 15%; color:#333333; margin-top:0.25em; }
            #entryform input[type="text"] { border: solid 1px #999999; }
            #messages { border: solid 1px #999999; }
            #messages li { padding: 0.5em; }
            .error { color: #ff0000; }
            .even { background-color: #ccccff; }
            .odd { background-color: #ffffff; font-style: italic; }       
            .messageBox { width: 73%; }
        </style>

    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="sm" runat="server" />
        <div>
            <h1>Windows Azure Chat</h1>
            <ul id="entryform">
                <li><span>Your name</span><asp:TextBox ID="nameBox" runat="server" Text="Anonymous" /></li>
                <li><span>Message</span><asp:TextBox ID="messageBox" runat="server" CssClass="messageBox" /> <asp:Button ID="submitButton" runat="server" Text="Submit" OnClick="SubmitButton_Click" /></li>
                <li><span><asp:LinkButton ID="lbDisplayMessages" runat="server" OnClick="lbDisplayMessages_Click" Text="Update Messages" /></span></li>
            </ul>
                    <div>
                        <asp:Label ID="status" runat="server" CssClass="error" />
                    </div>
                    <asp:GridView ID="messageList" runat="server" AutoGenerateColumns="false">
                        <AlternatingRowStyle CssClass="even" />
                        <RowStyle CssClass="odd" />
                        <Columns>
                        <asp:TemplateField HeaderText="Name">
                        <ItemTemplate>
                            <asp:HiddenField ID="hdPartitionKey" runat="server" Value='<%#Eval("PartitionKey") %>' />
                            <asp:HiddenField ID="hdRowKey" runat="server" Value='<%#Eval("RowKey") %>' />
                            <asp:HiddenField ID="hdTimeStamp" runat="server" Value='<%#Eval("TimeStamp") %>' />
                            <asp:HiddenField ID="hdName" runat="server" Value='<%#Eval("Name") %>' />
                            <asp:HiddenField ID="hdBody" runat="server" Value='<%#Eval("Body") %>' />
                            <asp:TextBox ID="txtName" runat="server" Text='<%# Eval("Name") %>' />
                            said:
                        </ItemTemplate>
                        </asp:TemplateField>                   
                        <asp:TemplateField HeaderText="Message">
                        <ItemTemplate>
                            <asp:TextBox ID="txtBody" runat="server" Text='<%# Eval("Body") %>' />
                        </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Operations">
                        <ItemTemplate>
                            <asp:LinkButton ID="updateMessage"
                                CommandName="Update"
                                runat="server" Text="Update" OnCommand="OnUpdateMessage" />
                            <asp:LinkButton ID="deleteMessage"
                                OnClientClick="return confirm('Delete Message?');"
                                CommandName="Delete"
                                runat="server" Text="Delete" OnCommand="OnDeleteMessage" />               
                        </ItemTemplate>
                        </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
        </div>
        </form>
    </body>
    </html>

    Source for Message.cs:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Microsoft.Samples.ServiceHosting.StorageClient;

    namespace TableCloudService_WebRole
    {
        public class Message : TableStorageEntity
        {
            //private string PartitionKey;
            //private string RowKey;
            public string Name { get; set; }
            public string Body { get; set; }

            public Message()
            {
                PartitionKey = "a";
                RowKey = String.Format("{0:10},{1}", DateTime.MaxValue.Ticks - DateTime.Now.Ticks,
                    Guid.NewGuid().ToString());
            }
        }
    }

    Source for MessageDataServiceContext.cs

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Microsoft.Samples.ServiceHosting.StorageClient;

    namespace TableCloudService_WebRole
    {
        public class MessageDataServiceContext : TableStorageDataServiceContext
        {
            public MessageDataServiceContext(StorageAccountInfo accountInfo) : base(accountInfo)
            {
            }

            public IQueryable<Message> Messages
            {
                get
                {
                    return this.CreateQuery<Message>("Messages");
                }
            }

            public void AddMessage(string name, string body)
            {
                Message MessageEntity = new Message { Name = name, Body = body };
                this.AddObject("Messages", MessageEntity);
                this.SaveChanges();
            }

            public void DeleteMessage(Object MessageEntity)
            {
                this.DeleteObject(MessageEntity);
                this.SaveChanges();
            }

            public void UpdateMessage(Object MessageEntity)
            {
                this.UpdateObject(MessageEntity);
                this.SaveChanges();
            }
        }
    }
  • ASP.NET Podcast Show #132 - Windows Azure Blob Storage - video

    blank_page

    Subscribe to All!

    Subscribe to WMV.

    Subscribe to M4V (iPod).

    Subscribe to MP3.

    Download WMV.

    Download MP4 for iPod.

    Download MP3 (audio only).

    Win a ticket to the MDC in Detroit.  Enter here.

    ASP.NET Podcast Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/12/22/asp-net-podcast-show-132-windows-azure-blob-storage-video.aspx


    Show Notes:

    • Azure SDK.
      •  Vista SP1.
      • Visual studio 2008/.NET 3.5 SP1.
      • Local Development.Speed.
      • VPC.
      • Improvements are coming.
      • YMMV.
    • Project type.
      • Configuration settings.
      • Web Project.
    • Storage Client.
    • Local Development Fabric.
    • Local Development Storage.
    • Hands on Labs. This example is taken, with modifications, from the hands on labs.

     

    Local Development Storage Setup:

    Development Storage Setup

    Local Development Storage:

    Storage Icon

    Source Code for Default.aspx.cs file:

    using System;
    using System.Collections;
    using System.Collections.Specialized;
    using System.Configuration;
    using System.Data;
    using System.Globalization;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using Microsoft.ServiceHosting.ServiceRuntime;
    using Microsoft.Samples.ServiceHosting.StorageClient;

    namespace CloudImageService_WebRole
    {
        public partial class _Default : System.Web.UI.Page
        {
            private string unknownValue = "unknown";
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    RefreshGallery();
                }
            }

            protected void upload_Click(object sender, EventArgs e)
            {
                if (imageFile.HasFile)
                {
                    status.Text = "Inserted [" + imageFile.FileName +
                        "] - Content Type [" + imageFile.PostedFile.ContentType + "]";
                    SaveImages(Guid.NewGuid().ToString(), imageName.Text, imageDescription.Text,
                        imageTags.Text, imageFile.FileName, imageFile.PostedFile.ContentType,
                        imageFile.FileBytes);
                    imageTags.Text = String.Empty;
                    imageDescription.Text = String.Empty;
                    imageName.Text = String.Empty;
                    RefreshGallery();
                }
                else{
                    status.Text = "No image file uploaded.";
                }
            }

            private void SaveImages(string id, string name, string description, string tags, string fileName, string contentType, byte[] data)
            {
                BlobProperties properties = new BlobProperties(string.Format(CultureInfo.InvariantCulture, "image_{0}", id));
                NameValueCollection metadata = new NameValueCollection();
                BlobContainer container = GetContainer();
                metadata["Id"] = id;
                metadata["Filename"] = fileName;
                metadata["ImageName"] = String.IsNullOrEmpty(name) ? unknownValue : name;
                metadata["Description"] = String.IsNullOrEmpty(description) ? unknownValue : description;
                metadata["Tags"] = String.IsNullOrEmpty(tags) ? unknownValue : tags;
                properties.Metadata = metadata;
                properties.ContentType = contentType;
                BlobContents imageBlob = new BlobContents(data);
                container.CreateBlob(properties, imageBlob, true);
               
            }

            protected void OnBlobDataBound(object sender, ListViewItemEventArgs e)
            {
                BlobContainer container = GetContainer();
                if (e.Item.ItemType == ListViewItemType.DataItem)
                {
                    Repeater metadataRepeater = e.Item.FindControl("blobMetadata") as Repeater;
                    BlobProperties blob = ((ListViewDataItem)(e.Item)).DataItem as BlobProperties;
                    NameValueCollection metadata = container.GetBlobProperties(blob.Name).Metadata;
                    metadataRepeater.DataSource = from key in metadata.AllKeys
                                                  select new
                                                  {
                                                      Name = key,
                                                      Value = metadata[key]
                                                  };
                    metadataRepeater.DataBind();
                }
            }

            protected void OnDeleteImage(object sender, CommandEventArgs e)
            {
                BlobContainer container = GetContainer();
                if (e.CommandName == "Delete")
                {
                    string blobName = (string)e.CommandArgument;
                    if (container.DoesBlobExist(blobName))
                    {
                        container.DeleteBlob(blobName);
                    }
                    else
                    {
                        status.Text = "Item does not exist";
                    }
                    RefreshGallery();
                }
            }

            private void RefreshGallery()
            {
                BlobContainer container = GetContainer();
                images.DataSource = container.ListBlobs(String.Empty, false);
                images.DataBind();
            }

            /// <summary>
            /// This is code written against an early CTP.
            /// It is neither production ready or a best of breed.
            /// It is merely code that works today.
            /// </summary>
            /// <returns></returns>
            private BlobContainer GetContainer()
            {
                string blobContainer = RoleManager.GetConfigurationSetting("ContainerName");
                BlobStorage blobStorage = BlobStorage.Create(StorageAccountInfo.GetDefaultBlobStorageAccountFromConfiguration());
                BlobContainer newContainer = blobStorage.GetBlobContainer(blobContainer);
                if (!newContainer.DoesContainerExist())
                {
                    newContainer.CreateContainer(null, ContainerAccessControl.Public);
                }
                return (newContainer);
            }
        }
    }

    Source code for Default.aspx:

     <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CloudImageService_WebRole._Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Azure Blob Storage Engine Page</title>
            <style type="text/css">
            body { font-family: Verdana; font-size: 12px; }
            h1 { font-size:x-large; font-weight:bold; }
            h2 { font-size:large; font-weight:bold; }
            img { width:200px; height:175px; margin:2em;}
            li { list-style: none; }
            ul { padding:1em; }
            
            .form { width:50em; }
            .form li span {width:30%; float:left; font-weight:bold; }
            .form li input { width:70%; float:left; }
            .form input { float:right; }
            
            .item { font-size:smaller; font-weight:bold; }
            .item ul li { padding:0.25em; background-color:#ffeecc; }
            .item ul li span { padding:0.25em; background-color:#ffffff; display:block; font-style:italic; font-weight:normal; }
        </style>

    </head>
    <body>
        <form id="form1" runat="server">
        <div>
                <h1>Image Gallery (Windows Azure Blob Storage)</h1>
            <div class="form">
                <ul>
                    <li><span>Name</span><asp:TextBox ID="imageName" runat="server"/></li>
                    <li><span>Description</span><asp:TextBox ID="imageDescription" runat="server"/></li>
                    <li><span>Tags</span><asp:TextBox ID="imageTags" runat="server"/></li>
                    <li><span>Filename</span><asp:FileUpload ID="imageFile" runat="server" /></li>
                </ul>
                <asp:Button ID="upload" runat="server" onclick="upload_Click" Text="Upload Image" />
            </div>
            <div>
            Status: <asp:Label ID="status" runat="server" />
            </div>

                <asp:ListView ID="images" runat="server" OnItemDataBound="OnBlobDataBound">
                <LayoutTemplate>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                </LayoutTemplate>
                <EmptyDataTemplate>
                    <h2>No Data Available</h2>
                </EmptyDataTemplate>            
                <ItemTemplate>            
                    <div class="item">
                        <ul style="width:40em;float:left;clear:left" >
                        <asp:Repeater ID="blobMetadata" runat="server">
                        <ItemTemplate>
                            <li><%# Eval("Name") %><span><%# Eval("Value") %></span></li>
                        </ItemTemplate>
                        </asp:Repeater>
                        <%-- UNCOMMENT THE FOLLOWING LINES FOR DELETE FUNCTIONALITY --%>
                            <li>
                            <asp:LinkButton ID="deleteBlob"
                                    OnClientClick="return confirm('Delete image?');"
                                    CommandName="Delete"
                                    CommandArgument='<%# Eval("Name")%>'
                                    runat="server" Text="Delete" oncommand="OnDeleteImage" />                
                            </li>
                        </ul>                    
                        <img src="<%# Eval("Uri") %>" alt="<%# Eval("Name") %>" style="float:left"/>
                    </div>
                </ItemTemplate>
            </asp:ListView>
        </div>
        </form>
    </body>
    </html>

    .csdef file:

    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="CloudImageService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
      <WebRole name="WebRole">
        <InputEndpoints>
          <!-- Must use port 80 for http and port 443 for https when running in the cloud -->
          <InputEndpoint name="HttpIn" protocol="http" port="80" />
        </InputEndpoints>
        <ConfigurationSettings>
          <Setting name="AccountName" />
          <Setting name="AccountSharedKey" />
          <Setting name="BlobStorageEndpoint" />
          <Setting name="QueueStorageEndpoint" />
          <Setting name="TableStorageEndpoint" />
          <Setting name="ContainerName" />
        </ConfigurationSettings>
      </WebRole>
    </ServiceDefinition>

    cscfg file:

    <?xml version="1.0"?>
    <ServiceConfiguration serviceName="CloudImageService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
      <Role name="WebRole">
        <Instances count="1"/>
        <ConfigurationSettings>
            <Setting name="AccountName" value="devstoreaccount1" />
            <Setting name="AccountSharedKey" value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
            <Setting name="BlobStorageEndpoint" value="http://127.0.0.1:10000/" />
            <Setting name="QueueStorageEndpoint" value="http://127.0.0.1:10001/" />
            <Setting name="TableStorageEndpoint" value="http://127.0.0.1:10002/" />
            <Setting name="ContainerName" value="storagegallery" />
        </ConfigurationSettings>
      </Role>
    </ServiceConfiguration>
  • ASP.NET Podcast Show #131 - General discussions on Cloud Computing with Wally, David, and Scott Cate - mp3 audio

    blank_page

    Subscribe to everything!

    Subscribe to the MP3 file(s) only.

    Download.

    ASP.NET Podcast Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/12/22/asp-net-podcast-show-132-windows-azure-blob-storage-video.aspx

    Show Notes:

    • General discussions on  Cloud Computing.
    • Scott on CloudDB.  Scott gets into the specifics of CloudDB, including how to let customer's setup databases.
  • My rules for talks

    I have some new rules regarding talks. This is based on the fact that I am a developer first and foremost. I deal with code more than anything else. Years ago, I realised the importance of talking and getting in front of people. Its why I get out and speak and why I run the asp.net podcast. Here you go: 1. Sleep. Get sleep. Without sleep, the mind is not fresh. 2. Don't do someone else's talk. You don't know all their thoughts. Watching their talk is helpful, but its hard when you weren't involved in the creation of the talk.
  • Twitter - success or failure for users?

    Do you twitter? Tweet? Has it been a success for u? How has it been a success? For the past year, I've been asking "what is the value of twitter?". First, let's ask what is the value of doing something? For me, I am asking if something will: increase my net worth, increase my personal network, increase my knowledge, allow me to talk (years ago, I was shy and was afraid of getting infront of people), increase my google pagerank (seriously), or provide me some level of measureable benefit that outweights the cost. Okay, what's the value of twitter? Some tweeple think that twitter is the greatest thing sice sliced bread. I'm not convinced. Twitter has a problem with google. The pagerank of links in help twitter users. Because twitter has a character limit of 140 characters, links on twitter point to a url shortener, such as tinyurl. The result is that twitter doesn't help u much if at all increase your page ranking. Having said the above, twitter allows you to increase your personal network from around the world. I have two people in iran that follow me, that's a cool surprise. Where else can u easily talk to people around the world? Lately, I've been lots of local followers, which is really cool. A big issue that no one talks about is the business value of twitter. Will twitter be around in a year? Are my approximately 4k of tweets destined for the scrap heap? Is it a success for me? Somewhat.
    Posted Dec 07 2008, 02:33 PM by wallym with no comments
    Filed under:
  • Turner Gill

    Did u watch the MAC championship on friday night? While the folks at Ball State r upset, the truth is that this game was the coming out party for Buffalo head coach Turner Gill. Gill was the quarterback for the 1983 Nebraska Cornhuskers. They lost in the Orange Bowl to finish 11-1. Gill is one of the few minority coaches in major college football. Given that Gill has taken a team from next to nothing to a bowl game in 3 years, I predict he will get a shot at a bigger major college in the next couple of years. BCS level football is about winning. This guy appears to be a winner.
  • Do mobile browsers create a security risk?

    Do you use a mobile phone? Do you use twitter, blogs, facebbok, or some other social network from your mobile phone? I do. In fact, I think that I twitter more from my mobile phone than anywhere else. Do I login every time I use twitter? Nope. In fact, I have recently changed my twitter password. Have I been asked to login recently on my phone? Nope. Now, what would happen if I lost me phone? Well, you would get access to my blog my twitter and anything else that's on my phone. To make it a little more secure, its probably a good idea to not save your password. If u lose your phone, you r SOL
  • ASP.NET Podcast Show #130 - David and Wally talk about .NET 3.5 Service Pack 1

    Subscribe to Everything.

    Subscribe to MP3.

    Download.

    Show Notes:

    • Where is Dave at?
    • Let's talk new features in SP1.
  • ASP.NET Podcast Show #129 - Caching with .NET 3.5 SP1

     

    Subscribe to All!

    Subscribe to WMV.

    Subscribe to M4V (iPod).

    Subscribe to MP3.

    Download WMV.

    Download M4V (iPod).

    Download MP3.

    Original Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/12/04/asp-net-podcast-show-129-caching-with-net-3-5-sp1.aspx

    Show Notes:

    • New Caching Support in .NET 3.5 SP1.

    Source Code:

        protected void Page_Load(object sender, EventArgs e)

        {

            string Output = String.Empty;

            if (!Page.IsPostBack)

            {

                lblOutput.Text = GetCacheItem();

            }

        }

     

        private string GetCacheItem()

        {

            string OutValue = String.Empty;

            if (Cache["Test"] != null)

            {

                OutValue = Convert.ToString(Cache["Test"]);

            }

            else

            {

                OutValue = DateTime.Now.ToString();

                Cache.Insert("Test", OutValue, null,

                    DateTime.Now.AddSeconds(10),

                    TimeSpan.Zero, OnUpdateCallback);

            }

            return (OutValue);

        }

        private void OnUpdateCallback(String key, CacheItemUpdateReason r,

            out Object ObjectToCreate, out CacheDependency CacheDependencies,

            out DateTime DateTimeExpire, out TimeSpan TimeSpanExpire)

        {

            ObjectToCreate = DateTime.Now;

            CacheDependencies = null;

            DateTimeExpire = DateTime.Now.AddSeconds(10);

            TimeSpanExpire = TimeSpan.Zero;

        }

     

More Posts Next page »
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems