我正在寻找不同的 持续集成(CI)服务器(特别是关注.NET)的比较,但找不到任何.
因此,我想知道您对可用的不同解决方案的看法,优缺点是什么,托管要求是什么以及为什么CI Server XY是您选择的服务器.
我对你的想法很感兴趣(随意评论别人):
兴趣点是:
我有一个像这样的POCO:
public class BlogEntry
{
public string Title { get; set; }
public DateTime Date { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
大部分时间它都是从Entity Framework中提取的,但它可以并且将在Entity Framework之外使用.
来自EF的日期的DateTimeKind是未指定的,从我读到的是正常的.
当我在Redis中缓存此POCO(使用ServiceStack Redis客户端)时,它返回DateTimeKind of Local.
因此返回的对象存在抖动.第一遍(未缓存)具有ISO-8061,没有偏移(DateTimeKind.Unspecified).第二遍(缓存)是带有偏移的ISO-8061(来自Redis with DateTimeKind.Local).
是否有任何方法可以强制ServiceStack JSON序列化程序始终将日期解释为给定的DateTimeKind?(我知道有一个"JsConfig.AppendUtcOffset"属性,但无论是真还是假,价值观永远不会改变?)
或者在我的类型化RedisClient的反序列化过程中的某个地方使DateTimeKind本地?
我可以手动更改我的POCO来强制执行DateTimeKind - 这是有效的 - 但我希望有一些不易出错的东西.
我有一项任务,需要使用NIST SP 800-56A第5.8.1节中描述的密钥导出函数来获取密钥材料.我不是密码学方面的专家,所以如果问题很幼稚,请原谅我.这是我到目前为止所做的:
现在我尝试使用C#(.NET 4)ECDiffieHellmanCng类使用ECDH 1.3.132.1.12生成共享密钥,如下所示:
// The GetCngKey method reads the private key from a certificate in my Personal certificate store
CngKey cngPrivateKey = GetCngKey();
ECDiffieHellmanCng ecDiffieHellmanCng = new ECDiffieHellmanCng(cngPrivateKey);
ecDiffieHellmanCng.HashAlgorithm = CngAlgorithm.ECDiffieHellmanP256;
ecDiffieHellmanCng.KeyDerivationFunction = ?? // What do I set here
Run Code Online (Sandbox Code Playgroud)最后这样做:
ecDiffieHellmanCng.DeriveKeyMaterial(otherPartyPublicKey:);
Run Code Online (Sandbox Code Playgroud)
在哪里/如何设置其他参数算法ID,Party U Info,Party V Info?
编辑 我愿意使用像Bouncy Castle这样的其他库(只要它们可以从.NET调用)
注意:我没有执行类似于Topshelf安装程序要求我按Enter两次的任何操作-为什么?
服务等级(有趣的部分):
public class ServiceCore
{
public ServiceCore(ServiceRuntimeConfiguration serviceRuntimeConfiguration)
{
_runningTasks = new List<Task>();
}
public bool Start(HostControl hostControl)
{
_hostControl = hostControl;
_messageProcessor.Start(); // Starts a System.Threading.Tasks.Task
StartListener(); // starts a System.Threading.Tasks.Task
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
Program.cs:
Host host = HostFactory.New(configurator =>
{
configurator.UseNLog();
// Configure core service
configurator.Service<ServiceCore>(svc =>
{
svc.ConstructUsing(theService => new ServiceCore(_serviceRuntimeConfiguration));
svc.WhenStarted((svc, hostControl) => svc.Start(hostControl));
svc.WhenStopped((svc, hostControl) => svc.Stop(hostControl));
});
// Configure recovery params
configurator.EnableServiceRecovery(recoveryConfigurator =>
{
recoveryConfigurator.RestartService(0);
recoveryConfigurator.OnCrashOnly();
recoveryConfigurator.SetResetPeriod(1);
});
// Execute HostConfigurator …
Run Code Online (Sandbox Code Playgroud) 我试图将 ASP 会话 ID cookie 标记为 HttpOnly 但似乎无法找到一种方法来判断它是否正常工作。我正在尝试的环境如下:操作系统:Windows Server 2003 IIS:6 ASP 版本:ASP 3(经典 ASP)
为了仅将 cookie 标记为 http,我遵循了MS KB
根据我们架构师的建议,要测试这是否有效,javascript document.cookie 应该无法读取 ASPSESSIONID* cookie。我的问题是 javascript:alert(document.cookie) 仍然响应 ASPSESSIONID* cookie,尽管它似乎是加密的(?)
我还尝试通过 Response.AddHeader "Set-Cookie" 执行此操作,但无法确定为此标头提供什么值以将所有 cookie 或至少 ASP 会话 ID cookie 标记为 HttpOnly。帮助!!!
似乎无法让我的默认路由在ASP.NET Core 2.0中运行,我忽略了什么?
Startup.cs
public class Startup
{
public IConfiguration Configuration { get; set; }
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseMvc(routes =>
{
routes.MapRoute("default", "{controller}/{action}/{id?}", new { controller = "Home", action = "Index" });
});
}
}
Run Code Online (Sandbox Code Playgroud)
HomeController.cs
[Route("[controller]")]
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
}
Run Code Online (Sandbox Code Playgroud)
当我浏览网址时,没有任何反应,没有重定向到主页?
c# ×4
.net ×2
asp-classic ×1
asp.net-core ×1
comparison ×1
cookies ×1
cryptography ×1
ecdsa ×1
iis-6 ×1
servicestack ×1
sessionid ×1
topshelf ×1