azure-sdk-.net

How to deploy App_Data files with Azure cloud service (web role)

穿精又带淫゛_ 提交于 2019-12-07 01:43:43
问题 I have a read-only data file (for IP geolocation) that my web role needs to read. It is currently in the App_Data folder, which is not included in the deployment package for the cloud service. Unlike "web deploy", there is no checkbox for an azure cloud service deployment to include/exclude App_Data. Is there a reasonable way to get the deployment package to include the App_Data folder/files? Or is using Azure storage for this sort of thing the better way to go? (cost and performance wise) Am

CloudConfigurationManager missing from Azure SDK v2.4?

♀尐吖头ヾ 提交于 2019-12-06 23:07:01
问题 Can someone help me figure out where CloudConfigurationManager exists in Azure SDK v2.4? CloudConfigurationManager, in the v2.3 SDK, is located in: C:\Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.3\ref\Microsoft.WindowsAzure.Configuration.dll The 2.4 SDK is at C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.4 And there's no such Microsoft.WindowsAzure.Configuration.dll in that directory.. MSDN still shows CloudConfigurationManager in Microsoft.WindowsAzure.Configuration.dl: http:/

Scale Azure WebApp using .NET SDK

三世轮回 提交于 2019-12-06 17:08:35
Description of the Microsoft.WindowsAzure.Management.WebSites NuGet package says that it " Provides management capabilities for Microsoft Azure Web Sites. Deploy, configure, debug, and scale your websites " What class and methods should I use to perform a scaling operation? My previous question on this topic was marked as duplicated, but I don't agree, here is an explanation: Scale Azure web app with Azure Management Libraries for .NET Try this PSEUDO code. You'll need to transform config from Response to Update model. var config = client.WebSites.GetConfiguration(webspace, website); config

Simplest way to access azure programmatically

时光毁灭记忆、已成空白 提交于 2019-12-06 05:11:27
问题 I have the following code: var client = new WebSiteManagementClient(creds); var data = client.WebSites.Get("eastuswebspace", "some-site", new WebSiteGetParameters()); I need to generate credentials, I am an admin with full access. Only one App accessing my data and need to generate a TokenCloudCredentials. I tried registering an App but getting a "forbidden" error after successfully generating the token. Is there a simplest way of doing this (like Github, generate a token and it's done?).

Azure Resource Group Set Tags with SDK?

房东的猫 提交于 2019-12-05 21:56:41
I have used code similar to http://blogs.infinitesquare.com/b/tranise/archives/-azure-resource-group-une-nouvelle-facon-dorganiser-ses-environnements-dans-azure#.Vr1RrfIrLgk to create a Resource Group in Azure with C#. I am now trying to extend it by putting Tags on the Resource. Adding resourceGroupGetResult.ResourceGroup.Tags.Add("a","1") works, but a subsequent CreateOrUpdateAsync call fails with "InvalidRequestContent: The request content was invalid and could not be deserialized: 'Could not find member 'provisioningState' on object of type 'ResourceGroupDefinition'. Path

How to create app registration using Azure SDK

此生再无相见时 提交于 2019-12-05 21:02:51
I need to create an app registration with Azure AD using Azure SDK (or using rest api call, if it's not possible with SDK) normally you do it manually using portal: or calling Azure CLI command az ad app create How can I do it from SDK or REST service There are 2 possible ways to do this. You can pick what works based on your scenario. Microsoft Graph API Beta Endpoint Microsoft Graph API Beta endpoint and working with Application resource (as answered by Jean-Marc Prieur earlier too). POST https://graph.microsoft.com/beta/applications NOTE : This would work but caveat being it's a beta

Azure Table Storage CreateQuery in .NET Core

≡放荡痞女 提交于 2019-12-04 16:11:28
问题 I'm porting my existing class library that targets .NET Framework 4.6.2 to .NET Core 1.1. Looks like some of the methods that are available in .NET Framework version are not there in .NET Core. Two such methods are table.CreateQuery and table.ExecuteQuery . Here's an existing function that's giving me an error for CreateQuery: public T Get<T>(string partitionKey, string rowKey, string tableName) where T : ITableEntity, new() => getTable(tableName).CreateQuery<T>().Where(r => r.PartitionKey ==

Where is the NuGet package for Microsoft.WindowsAzure.ServiceRuntime?

允我心安 提交于 2019-12-04 14:55:20
问题 We had previously been referring to our Windows Azure libraries via the SDK and I noticed that they have NuGet packages for them now. This is obviously way better, so I'm swapping out all of those references for the NuGet packages. However, I can't find a NuGet package for Microsoft.WindowsAzure.ServiceRuntime.dll that contains classes such as RoleEnvironment, etc. Are we supposed to be referencing this dll from the SDK installation and not a nuget package? That seems extremely odd. Am I just

Simplest way to access azure programmatically

徘徊边缘 提交于 2019-12-04 09:15:39
I have the following code: var client = new WebSiteManagementClient(creds); var data = client.WebSites.Get("eastuswebspace", "some-site", new WebSiteGetParameters()); I need to generate credentials, I am an admin with full access. Only one App accessing my data and need to generate a TokenCloudCredentials. I tried registering an App but getting a "forbidden" error after successfully generating the token. Is there a simplest way of doing this (like Github, generate a token and it's done?). Thanks. I managed to make it work with the following snippet. It just needs the certificate. Check if that

Azure: How to move messages from poison queue to back to main queue?

强颜欢笑 提交于 2019-12-04 00:42:19
I'm wondering if there is a tool or lib that can move messages between queues? Currently, i'm doing something like below public static void ProcessQueueMessage([QueueTrigger("myqueue-poison")] string message, TextWriter log) { CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connString); CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); CloudQueue queue = queueClient.GetQueueReference("myqueue"); queue.CreateIfNotExists(); var messageData = JsonConvert.SerializeObject(data, new JsonSerializerSettings { ContractResolver = new