我目前正在开发一个部署在AWS上的系统。使用通过 Amazon EventBridge 传递的事件进行通信的服务集合。我正在努力寻找一种在本地运行系统的方法,因为我也不知道如何才能
有没有办法可以在本地运行我的服务,让服务将事件发送到真实(或模拟)的 EventBridge 实例,并将这些事件路由到我的本地服务?
并不是说它太重要,而是我的服务是在 Windows 上运行的 .NET Core 应用程序。
我目前正在创建一个用户可以查看和修改其小部件的网站.所有与存储在我的服务器上的小部件数据的交互都将通过RESTful Web服务完成.例如,如果用户想要查看其小部件列表,则执行流程将类似于:
https://www.example.com/Login.htm服务器并进行身份验证(在我的情况下通过OpenID提供程序)https://www.example.com/Widgets.htmgetWidgets()将调用javascript函数.getWidgets()将致电我的网络服务https://www.example.com/Services/Widget/12345renderWidgets(widgets)将更新html页面我不希望除了用户12345以外的任何人访问他们自己的小部件,所以我想我getWidgets()必须为我的网络服务提供一些身份验证.我不确定实现这一目标的最佳方法是什么.
我当时认为客户端和服务器可能有共享密钥getWidgets()将发送到Web服务.服务器可以生成此秘密作为随机字符串(数字,GUID或其他),并在客户端请求初始HTML页面时将其包含在响应头中.客户端在向服务器发送请求时将使用此密钥.
这听起来像是一个明智的想法吗?
这是一个常见的要求,那么是否有一种实现同样目标的标准方法?据我所知,这超出了OpenID的范围,OAuth也不合适.
提前致谢.
我试图从我的.NET Core启动设置中删除IIS Express配置文件,但每次重新编写解决方案时,Visual Studio都会重新添加它.例如,在新项目中,我的启动设置如下所示
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55735/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我删除了IIS部分
{
"profiles": {
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
解决方案运行正常.但是一旦我关闭并重新打开解决方案,IIS部分就会重新出现.
有任何想法吗?
iis-express .net-core kestrel-http-server asp.net-core-webapi
我目前正在测试Tridion 2011,并且在创建带有上传内容的多媒体组件时遇到了问题(而不是外部).
我填写标题,架构,多媒体类型,从我的系统中选择一个文件,然后单击保存.我收到一条Saving item...信息消息,大约30秒后我会收到一条The wait operation timed out消息.
目录中似乎没有任何错误消息C:\Program Files (x86)\Tridion\log.查看事件查看器,我看到以下有关保存操作的信息
Unable to save Component (tcm:4-738361).
The wait operation timed out
Error Code:
0x8004033F (-2147220673)
Call stack:
System.Data.SqlClient.SqlConnection.OnError(SqlException,Boolean,Action`1)
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException,Boolean,Action`1)
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject,Boolean,Boolean)
System.Data.SqlClient.TdsParser.TryRun(RunBehavior,SqlCommand,SqlDataReader,BulkCopySimpleResultSet,TdsParserStateObject,Boolean&)
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader,RunBehavior,String)
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior,RunBehavior,Boolean,Boolean,Int32,Task&,Boolean)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior,RunBehavior,Boolean,String,TaskCompletionSource`1,Int32,Task&,Boolean)
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1,String,Boolean,Int32,Boolean)
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
Tridion.ContentManager.Data.AdoNet.Sql.SqlDatabaseUtilities.SetBinaryContent(Int32,Stream)
Tridion.ContentManager.Data.AdoNet.ContentManagement.ItemDataMapper.Tridion.ContentManager.Data.ContentManagement.IItemDataMapper.SetBinaryContent(Stream,TcmUri)
Tridion.ContentManager.ContentManagement.RepositoryLocalObject.SetBinaryContent(BinaryContent)
Tridion.ContentManager.ContentManagement.Component.OnSaved(SaveEventArgs)
Tridion.ContentManager.IdentifiableObject.Save(SaveEventArgs)
Tridion.ContentManager.ContentManagement.VersionedItem.Save(Boolean)
Tridion.ContentManager.ContentManagement.VersionedItem.Save()
Tridion.ContentManager.BLFacade.ContentManagement.VersionedItemFacade.UpdateAndCheckIn(UserContext,String,Boolean,Boolean)
XMLState.Save
Component.Save
Run Code Online (Sandbox Code Playgroud)
由于另一个问题,我已将Content Manager Snap-In中的超时设置设置为高值(超过10分钟).
BINARIES如果有帮助,内容管理数据库中的表为25GB.
有任何想法吗?谢谢.
根据Bart Koopman的建议,我的DBA重建了索引,但并未认为事务日志对性能有任何影响.问题依然存在.
我刚刚发现了错误的更多细节
Unable to save Component (tcm:0-0-0).
Timeout expired.
The timeout period elapsed prior to completion of …Run Code Online (Sandbox Code Playgroud) 我一直在关注如何设置我的网站以允许跨站点脚本请求的Mozilla文章.使用IIS管理器我添加了以下HTTP响应标头
Access-Control-Allow-Origin : *
Access-Control-Allow-Headers : Origin, SecurityPrivateKeyID
Access-Control-Allow-Methods : GET, POST, PUT, DELETE, OPTIONS
Run Code Online (Sandbox Code Playgroud)
尽管如此,我仍然405 Method Not Allowed在浏览器(Firefox和Chrome)发送带有自定义SecurityPrivateKeyID标头的飞行前请求时.
请求
OPTIONS /Service/Json/User.svc/ HTTP/1.1
Host: serviceprovider.com
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Origin: http://client.com
Access-Control-Request-Method: GET
Access-Control-Request-Headers: securityprivatekeyid
Connection: keep-alive
Run Code Online (Sandbox Code Playgroud)
响应
HTTP/1.1 405 Method Not Allowed
Allow: GET
Content-Length: 1565
Content-Type: text/html; charset=UTF-8
Server: Microsoft-IIS/8.0
access-control-allow-origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS …Run Code Online (Sandbox Code Playgroud) 我是视频编码的新手,所以请耐心等待.
我正在使用FFMPEG.我有一个640 x 350的mp4文件,平均比特率约为2000kb(我认为),文件大小为80Mb.我想将其转换为具有低得多的比特率(128kb)但宽度和高度相同的ogv文件.我使用以下命令...
ffmpeg -i input.mp4 -b:v 128k output.ogv
Run Code Online (Sandbox Code Playgroud)
...但是FFMPEG似乎忽略了我的比特率选项并输出了一个大约600kb的比特率和大约3Mb的文件大小的文件.
我可以使用FFMPEG2THEORA使用以下命令执行此操作...
ffmpeg2theora -V 128 input.mp4 -o output.ogv
Run Code Online (Sandbox Code Playgroud)
......但我想知道是否有可能使用FFMPEG.
有任何想法吗?
mark4o解决了我的问题.事实证明,默认音频编解码器正在提升文件大小.将其更改为libvorbis可显着减少文件大小.最终命令看起来像
ffmpeg -i input.mp4 -b:v 128k -b:a 128k -codec:a libvorbis output128.ogv
Run Code Online (Sandbox Code Playgroud)
-i =输入文件-b:v =视频流的比特率-b:a =音频流的比特率-codec:a =覆盖默认音频编解码器我试图设置一个过滤器,只包含特定目录及其所有子目录的数据.
例如,我想包含dogs目录和子目录中的数据
http://www.mysite.com/dogs/
http://www.mysite.com/dogs/index.htm
http://www.mysite.com/dogs/breeds.htm
http://www.mysite.com/dogs/puppies/
http://www.mysite.com/dogs/puppies/index.htm
http://www.mysite.com/dogs/puppies/care/
http://www.mysite.com/dogs/puppies/care/feeding.htm
Run Code Online (Sandbox Code Playgroud)
在创建新过滤器时,我认为我应该选择a Pre-defined filter到Include only traffic to the subdirectories that begin with子目录/dogs/和not case sensitive.
我对它是否应该是that begin with或者有点困惑that are equal to.我是否适合that begin with在我的情况下使用并且我的子目录值是否正确?
(我问,因为数据需要24小时才能更新,所以错误地花费了很多时间)
是否有标准的方法让屏幕阅读器拼出数字?
我目前正在使用NVDA和Firefox并拥有以下电话号码
<p>01234 567890</p>
Run Code Online (Sandbox Code Playgroud)
这被视为
零一二三四有五六十七数千八百九十九
这对听众来说非常困惑.我想要一些方法来指定屏幕阅读器应该拼出数字
零一二三四有五六七八九零
我正在使用Tridion 5.3版.
使用业务连接器我想知道页面是否已发布到特定的发布目标.
使用TOM API我可以做到
// using types from Tridion.ContentManager.Interop.TDS
// and Tridion.ContentManager.Interop.TDSDefines
TDSE tdse = new TDSE();
Page page = (Page)tdse.GetObject(itemUri, EnumOpenMode.OpenModeView,
"tcm:0-0-0", XMLReadFilter.XMLReadAll);
page.IsPublishedTo(tcm);
Run Code Online (Sandbox Code Playgroud)
如果我使用业务连接器查询Tridion,我得到的唯一信息是页面是否已发布,而不是哪些目标.
我已经尝试查询发布目标本身,但是这不会提供有关它已发布的页面的信息.
有任何想法吗?
使用 azure 管道构建我的 .NET 5 函数时,出现以下错误
##[error]/home/vsts/.nuget/packages/microsoft.net.sdk.functions/3.0.11/build/Microsoft.NET.Sdk.Functions.Build.targets(32,5): Error : It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
- The following frameworks were found:
5.0.4 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
Run Code Online (Sandbox Code Playgroud)
这还会Error : Metadata generation failed在构建脚本的下方显示错误
##[error]/home/vsts/.nuget/packages/microsoft.net.sdk.functions/3.0.11/build/Microsoft.NET.Sdk.Functions.Build.targets(32,5): Error : Metadata generation failed.
Run Code Online (Sandbox Code Playgroud)
我的构建脚本是
trigger:
- master
stages:
- stage: 'Build'
jobs:
- job:
pool:
vmImage: 'ubuntu-latest'
workspace:
clean: all
steps:
- task: UseDotNet@2
displayName: Use Dot Net Core 5.0.x
inputs:
packageType: 'sdk'
version: …Run Code Online (Sandbox Code Playgroud) tridion ×2
.net-5 ×1
.net-core ×1
bitrate ×1
c# ×1
cors ×1
ffmpeg ×1
html ×1
iis-8 ×1
iis-express ×1
javascript ×1
numbers ×1
tridion-2011 ×1
wcag ×1
web-services ×1