using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.Samples.DPE.WebDeployHost1.Web.Resources.LandingPage.html"))
{
var fileContent = new StreamReader(stream).ReadToEnd().Replace("{WebSiteName}", siteName);
File.WriteAllText(Path.Combine(sitePath, "index.html"), fileContent);
}
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.Samples.DPE.WebDeployHost1.Web.Resources.LandingStyle.css"))
{
var fileContent = new StreamReader(stream).ReadToEnd();
File.WriteAllText(Path.Combine(sitePath, "Site.css"), fileContent);
}
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.Samples.DPE.WebDeployHost1.Web.Resources.PublishImage.png"))
{
var bitmap = new Bitmap(stream);
bitmap.Save(Path.Combine(sitePath, "publish.png"));
}
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Microsoft.Samples.DPE.WebDeployHost1.Web.Resources.SolutionImage.png"))
{
var bitmap = new Bitmap(stream);
bitmap.Save(Path.Combine(sitePath, "solution.png"));
}
[小木] 今回もいろいろありがとうございました。たまには(?)つまずくところもあったけど、Windows Azure Accelerator for Web Rolesを使ったら意外と簡単にAzure上にWebアプリを作成することが出来ました!もっとAzureを活用していろいろなWebサイト作成に挑戦してみたいな♪