Tag: azure application

返回HttpResponseMessage并配置Application Insights时,WebAPI响应永远不会完成

我有一个MVC5 / WebAPI2应用程序,自我创建Web项目以来已启用Application Insights。 WebApi返回对象的方法(例如字符串,模型对象)按预期返回 – 序列化为JSON或XML。 public class TestController : ApiController { [HttpGet] [AllowAnonymous] async public Task ReadString(int id) { HttpResponseMessage response = Request.CreateResponse(); string str; using (HttpClient client = new HttpClient()) { Uri uri = new Uri(“http://someurl.com/resource.rss”); str = await client.GetStringAsync(uri); } response.Content = new StringContent(str); response.Content.Headers.ContentLength = str.Length; return response; } } […]

将Azure Application Insights与Azure WebJob一起使用

Azure文档涵盖了将Azure Application Insights集成到不同应用程序类型(如ASP.NET,Java等)的许多示例。但是,该文档未显示将Application Insights集成到Azure WebJob中的任何示例。 有没有人链接到一个示例或文章,其中包含如何将Azure Application Insights集成到作为控制台应用程序构建的Azure WebJob中?