0
建立在蔚藍的Web應用程序我已經試圖通過fluent Azure Management Library創建一個Web應用程序。無法通過Azure管理庫
我目前DreamSpark認購。
這裏是我的Program.cs
static void Main(string[] args)
{
// Set some variables...
string rgName = "numbers1102rg";
string appName = SdkContext.RandomResourceName("WebApp", 20);
// Authenticate
var credentials = SdkContext.AzureCredentialsFactory
.FromFile(Environment.GetEnvironmentVariable("AZURE_AUTH_LOCATION"));
var azure = Azure
.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
.Authenticate(credentials)
.WithDefaultSubscription();
// Create the web app
Console.WriteLine("Creating Web App...");
var app = azure.WebApps.Define(appName)
.WithRegion(Region.USEast)
.WithNewResourceGroup(rgName)
.WithNewFreeAppServicePlan()
.DefineSourceControl()
.WithPublicGitRepository("https://github.com/Azure-Samples/app-service-web-dotnet-get-started")
.WithBranch("master")
.Attach()
.Create();
Console.WriteLine("Your web app is live at: https://{0}", app.HostNames.First());
// Wait for the user
Console.WriteLine("Press enter to continue...");
Console.ReadLine();
}
我也,做了azureauth.properties設置。
我也執行的步驟是從這裏貢獻者:
https://docs.microsoft.com/en-us/dotnet/azure/dotnet-sdk-azure-get-started?view=azure-dotnet
我公司通過交談的應用程序已經是一個貢獻者。 [這裏](http://imgur.com/a/FhcU1) – User1911