当我尝试将我的代码优先项目发布到 Azure 时,它向我显示以下警告:
警告:指定 SQL Server 2012 作为目标平台的项目可能会遇到与 Microsoft Azure SQL Database v12 的兼容性问题。
如何更改目标平台?
我用谷歌搜索过,但我发现的是数据项目的sql项目等等。
My application writes a lot of logs ib Dependencies which caused it to be super expensive (even more expensive than my server farms + database) and we have not used it for anything for months. How can I disable the dependencies but keep the rest (requests ,exceptions, custom events, etc.)?
In the documentation, adding application insights is not seperated from adding dipendencies. https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies
At the same time,
in application insights resource >Usage and estimated costs
The only options avalable are …
我想知道 Umbraco (7.5) 网站是否有默认的 Robots.txt。现在,我用这些物品创建了一个。我还要添加什么吗?
User-Agent: *
Disallow: /umbraco/
Disallow: /umbraco_client/
Disallow: /css
Disallow: /Errorpages/
Disallow: /scripts/
Disallow: /Config/
Run Code Online (Sandbox Code Playgroud) 我们是一家软件公司,因此我们为其他公司设置了解决方案。我想我们在这方面不是唯一的:),所以我想知道是应该创建一个新的订阅还是一个资源组。
我们尝试为每个客户添加订阅。这样,我们只需更改管理员个人资料,他们就可以完全脱离我们。帐单还可以,因为每次订阅我们都会收到不同的电子邮件,但是管理它们变得非常头疼。
从我的阅读中,我想我们可以使用资源组而不是订阅,并使用标签处理计费部分(还没有尝试过。可以吗?),但是我担心无法将其移至另一个他们问我们时订阅。
可能吗?那有多容易?它涉及联系支持吗?
有人尝试过吗?
我在Umbraco后台存储了一些电子邮件模板(意思是样本,不要与umbraco模板混淆).在某些时候,我需要使用此模板(主题,正文,cc,密件抄送等)发送电子邮件.为此,我使用自动生成的模型,这需要IPublishedContent初始化.
因此我无法初始化此模型,因为我无法获得类型的内容IPUblishedContent.
当我通过Id得到它一切正常.但我不想依赖于id,因为它改变并决定使用路径而不能这样做.执行以下命令时,我得到NullReferenceException:
contentCache.GetByRoute(true, "relative path to email template")//I think I am mistaken here as I am using cache
Run Code Online (Sandbox Code Playgroud)
相对路径看起来像"/settings/emailtemplate/registrationtemplate"任何人都可以指出我如何实现这一点,因为我是Umbraco的新手,并努力了解我应该如何做某些事情.
我最初尝试的另一种方法(也不成功)是按doc type id获取内容
var contentService = umbracoContext.Application.Services.ContentService;
var contentTypeService = umbracoContext.Application.Services.ContentTypeService;
var contentType = contentTypeService.GetContentType("emailSettings");
var templates = contentService.GetContentOfContentType(contentType.Id);
Run Code Online (Sandbox Code Playgroud)
然后我从ContentService获取内容:
var content = templates.FirstOrDefault(c => c.Name.Contains("Registration"));
var publishedContent = contentService.GetById(content.Id)
Run Code Online (Sandbox Code Playgroud)
但在这里,我得到了publishedContent,IContent并没有办法将其转换为IPublishedContent.
更新1
我发现原因是我试图从Umbraco API控制器获取已发布的内容.所以问题是有没有办法从api获取发布的内容?
我有一个文本区域,我必须在其中显示一些 sql 命令。我不想将其作为普通文本呈现给用户,我必须将其格式化为 SQL(如在管理工作室中)。是否有任何开源库(Javascript )可以帮助我实现我的目标吗?我目前使用 C# 作为后端。
我想编写一个代码来向状态页面报告我的网站状态,所以我正在考虑使用一个时间触发的作业,该作业从应用程序洞察中读取并每 5 分钟向状态页面报告一次。
唯一让我担心的是,如果网站出现异常并且出现故障会怎样?我也应该能够报告。
我知道它们在同一个物理空间上,所以如果这是问题,两者都会停机,但是正常的例外情况呢?
我找不到相关文档。
我编写了一个程序,需要签名证书和其他一些东西.
我已将我的pfx文件作为私有证书上传到我的应用服务的SSL证书中.
然后我想看看我的应用程序服务安装的证书,因为它已经被描述在这里使用电源外壳.
但我当前的用户没有任何证书.
我也不能使用我的c#代码找到它:
X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
certStore.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certCollection = certStore.Certificates.Find(X509FindType.FindByThumbprint, ThumbPrint, false);
if (certCollection.Count == 0)
throw new Exception("Certificate not found");
Run Code Online (Sandbox Code Playgroud) 我想要有一个相关性ID,以便能够跟踪应用程序洞察和其他地方的请求。我已在解决方案的 MVC 部分安装了correlationId nuget 包。如何在我的 Azure 函数上遵循相同的 ID?
举个例子,假设用户调用一个 API,并且该 API 将具有关联 ID:xxxx-1,然后作为请求的一部分,它写入将由 Azure 函数拾取的服务总线:
[FunctionName("func1")]
public async Task Run([ServiceBusTrigger("topic","subscription", Connection = "ServiceBusConnectionString")] Message message)
{
log.LogInformation("This is log");
}
Run Code Online (Sandbox Code Playgroud)
如何在函数上下文中应用correlationId?
azure ×5
c# ×5
umbraco ×2
.net-core ×1
asp.net ×1
javascript ×1
jquery ×1
robots.txt ×1
ssl ×1
umbraco7 ×1