Tag: azure

C#生成Azure表存储ConnectionString

我想使用azure subscriptionId和azureApiKey为azure表存储生成connectionString。 我找到了以下Microsoft库: https : //github.com/Azure/azure-libraries-for-net/tree/master但无法理解如何在此处生成connectionString。 我甚至找不到合适的方法。 我是否需要其他数据才能生成ConnectionString?

我知道有关上传的内容,我们是否必须在接收端做一些事情?

我的azure函数接收大型video文件和图像,并将其存储在Azure blob中。 客户端API正在以块的forms将数据发送到我的Azure htttp触发器function。 我是否必须在接收端执行某些操作以提高性能,例如以块的forms接收数据? Bruce,实际上客户代码是由其他团队开发的。 现在我正在邮递员测试它并从多部分http请求中获取文件。 foreach (HttpContent ctnt in provider.Contents) { var dataStream = await ctnt.ReadAsStreamAsync(); if (ctnt.Headers.ContentDisposition.Name.Trim().Replace(“\””, “”) == “file”) { byte[] ImageBytes = ReadFully(dataStream); var fileName = WebUtility.UrlDecode(ctnt.Headers.ContentDisposition.FileName); } } ReadFullyfunction public static byte[] ReadFully(Stream input){ using (MemoryStream ms = new MemoryStream()) { input.CopyTo(ms); return ms.ToArray(); }}

连接Azure Search后使用Document DB的好处

我正在为Azure Document DB存储数据。 为了允许搜索我的数据的描述字段,我已经将我的文档数据库存储库与Azure搜索连接起来,如下所述: https : //docs.microsoft.com/en-us/azure/documentdb/documentdb-search -indexer 我还需要通过几个参数来过滤搜索结果。 我发现自己在Azure搜索索引器中添加了更多字段,直到我几乎将我的数据库实体复制到Azure搜索实体。 问题 – 如果我需要搜索我的数据并决定使用Azure搜索,将数据保留在Document DB中是否有任何好处,还是仅使用Azure Search再次对其进行建模会更好?

如何通过端口80向Azure Service Bus发送消息?

据我所知,Azure Service总线使用端口9350,9353等来发送消息。 在我的组织中,由于防火墙策略,我们无法打开这些端口。 因此,每当我尝试将消息发送到Azure中的队列时,我都会收到错误消息 主机mycloudsevice.servicebus.windows.net不存在DNS条目“。 有没有办法通过端口80/443发送这些,因为它们总是打开的? 如果我能做任何示例或代码更改,请告诉我。

Azure通知中心社交网络方案中的最佳实践

我想知道哪个是Azure通知中心的最佳实践,可以向几个特定用户发送推送通知(例如关于后续活动)。 想象一下,用户可以关注其他用户,并且应该通知这些关注者有关新活动(facebook,twitter原则)。 如何详细发送这些通知,我正在考虑两个选项,但哪一个是最好的? 1)通过代码循环遍历所有需要的用户并为每个用户调用SendTemplateNotificationAsync ? foreach(user in allSubscribedUsers) { tags.Add(“userid:” + userId); await hub.SendTemplateNotificationAsync(notification, tags); } 2)具有用户可以注册的特殊标签 registration.Tags = new HashSet(deviceUpdate.Tags); // the current user follows other users with the ids 1,2 and 3 registration.Tags.Add(“followerUserid:1”); registration.Tags.Add(“followerUserid:2”); registration.Tags.Add(“followerUserid:3”); … // an acivity by user with id 2 is happen // send a push notification to all […]

如何使用c#读取在blob中捕获的事件中心日志数据

我有simple logic app , creates a text file 我想test whether the logic app created file is present in file storage 。 并且还想测试correlation id of logic app的correlation id of logic app的值 我创建了Event Hub和In Logic app configure Diagnostic Settings to Stream to an event hub 。 现在Inside Event hub I have configure Capture option to Azure Storage […]

我们可以将azure色事件中心与azure色通知中心连接吗?

我将消息从Windows窗体应用程序发送到azure事件中心。 在我使用数据流分析进行一些实时操作并从事件中心获取数据之后。 在该操作之后,我将结果消息发送到事件中心。 现在我想通过使用移动应用程序(Android或Windows移动应用程序)的azure通知集线器向用户显示结果消息。 我们可以直接连接azure通知集线器和azure事件集线器吗?

在Azure Cosmos DB中使用REST进行CRUD操作

我正在尝试使用REST对Azure Cosmos DB执行CRUD操作。 根据链接https://docs.microsoft.com/en-us/rest/api/documentdb/create-a-document我创建了我的有效负载并尝试在Opera浏览器中使用Restman进行测试。 以下是我的有效载荷详情 – 头 Authorization *************************** Content-Type application/query+json x-ms-date Tue, 05 Dec 2017 16:49:31 GMT x-ms-session-token Session x-ms-version 2017-02-22 身体 id sg4c828f-31f8-4db4-8e7c-e8bdff222dsg value { “id”: “AndersenFamily”, “LastName”: “Andersen”, “Parents”: [ { “FamilyName”: null, “FirstName”: “Thomas” }, { “FamilyName”: null, “FirstName”: “Mary Kay” } ], “Children”: [ { “FamilyName”: null, “FirstName”: “Henriette Thaulow”, […]

Azure网站抱怨角色环境。 未能在启动时初始化

我的问题类似于抱怨角色环境的Azure网站。 未能初始化 我在Azure应用服务支持事件查看器中看到的错误: “9236 w3wp角色环境。未能初始化.hr:-2147024891” 它在网站启动时每次都会发生。 除此之外 – 网站function很好。 除了,随机(可能需要10-30分钟),它停止与“申请被终止。” (我通过azure应用程序日志看到此错误)。 我不确定这两件事是否相关,但我试图先解决“未能初始化”的问题。 我的代码中没有任何对RoleEnvironment的引用(StackOverflow上的一些用户提到这可能是一个问题)。 我阅读了很多post,但似乎没有一个适用于我的案例。

Azure Service Bus无法接收JSON正文

调试此代码时,应用程序停止。 没有显示错误消息或exception。 X计划: client.OnMessage((message) => { using (var stream = message.GetBody()) using (var streamReader = new StreamReader(stream, Encoding.UTF8)) { var body = streamReader.ReadToEnd(); } } 下面我通过REST API发布JSON对象。 项目Y: public void CreateMessage(T messageToSend, string queueAddress, WebClient webclient) { var apiVersion = “&api-version=2014-01”; var serializedMessage = JsonConvert.SerializeObject(messageToSend, Formatting.Indented); string receivedMessageBody = webclient.UploadString(queueAddress + “/messages” + “?timeout=60&” + […]