Database Reference
In-Depth Information
2. To implement the activities, double click the button Submit in the Design view of the
Default.aspx ile. After the Default.aspx.cs ile is opened, insert the following code.
he code also includes the deinition of the Blob storage and Queue storage. he Blob
storage and Queue storage will be covered in the next two sections.
using System;
using System.IO;
using System.Net;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using StudentClub_Info;
namespace StudentClub_WebRole
{
public partial class Default : System.Web.UI.Page
{
private static bool storageInitialized = false;
//Declare a CloudBobClient type of object.
private static CloudBlobClient blobStorage;
//Declare a CloudQueueClient type of object.
private static CloudQueueClient queueStorage;
protected void Page_Load(object sender, EventArgs e)
{
}
private void StorageInit()
{
if (storageInitialized)
{
return;
}
//Initialize an account instance with connection string.
var
storageAccount = CloudStorageAccount.FromConfigurationSetting("
DataConnectionString");
//Create blob container for images.
//Do not use Upper case for container name.
blobStorage = storageAccount.CreateCloudBlobClient();
CloudBlobContainer
container = blobStorage.GetContainerReference("memberphoto");
container.CreateIfNotExist();
 
Search WWH ::




Custom Search