Database Reference
In-Depth Information
System.Diagnostics.Trace.TraceInformation(“Added entry
{0}-{1} in table storage for guest '{2}'", entry.PartitionKey,
entry.RowKey, entry.Name, entry.Major, entry.Photo);
Image1.ImageUrl = entry.Photo;
//queue a message.
var queue = queueStorage.GetQueueReference("myqueue");
var message = new
CloudQueueMessage(String.Format("{0},{1},{2}", entry.
PartitionKey, entry.RowKey, entry.Name));
queue.AddMessage(message);
}
}
}
}
3. To run the project, you need to set up the environment for the coniguration publisher.
To do so, double click the ile Global.asax.cs in Solution Explorer under StudentClub_
WebRole . After the ile is opened, insert the following two namespace declarations as
well as the code for the function void Application_Start(object sender, EventArgs e)
as shown below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
namespace StudentClub_WebRole
{
public class Global : System.Web.HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
//Code that runs on application startup.
Microsoft.WindowsAzure.CloudStorageAccount.SetConfigurationSet
tingPublisher((configName, configSetter) = >
{
configSetter(RoleEnvironment.GetConfigurationSettingVal
ue(configName));
});
}
void Application_End(object sender, EventArgs e)
{
//Code that runs on application shutdown.
}
void Application_Error(object sender, EventArgs e)
 
Search WWH ::




Custom Search