小编Dog*_*ars的帖子

Teamcity的Octopus部署不使用最新的软件包

我已经成立了一个TeamCity的构建步骤,如所描述这里,做自动释放部署到我们的测试服务器.但它没有使用TeamCity中构建的最新nuget包.

使用案例:

Teamcity将创建版本为1.0.0.9的nuget包,包中的所有dll都是正确的版本,并且部署的Octopus版本具有相同的版本号,但章鱼使用的包是早期的包,例如1.0.0.5.

我在构建步骤中指定了--force参数,因此它应该使用最新的包,但事实并非如此.

如果我在Octopus中手动创建一个版本,并选择最新的软件包它正在100%工作

如果我遗失了某些东西,请有人告诉我.

提前致谢

teamcity octopus-deploy

21
推荐指数
1
解决办法
6002
查看次数

使用SignedXml类添加基于Id属性的引用时,"格式错误的引用元素"

当存在名称空间前缀时,无法通过Id属性对元素进行签名:

void Main()
{
    var doc = new XmlDocument();
    doc.LoadXml("<root xmlns:u=\"myuri\"><test u:Id=\"_0\">Zebra</test></root>");

    SignedXml signedXml = new SignedXml(doc);
    signedXml.SigningKey = new RSACryptoServiceProvider();

    Reference reference = new Reference("#_0");
    signedXml.AddReference(reference);

    signedXml.ComputeSignature();
}
Run Code Online (Sandbox Code Playgroud)

ComputeSignature() 这里会出现'格式错误的参考元素'应该怎么做?

c# xml soap cryptography xml-signature

19
推荐指数
1
解决办法
2万
查看次数

使用FOR XML PATH时,如何在嵌套查询中删除冗余命名空间

UPDATE:我发现有提出针对此问题的Microsoft连接的项目在这里

当使用FOR XML PATHWITH XMLNAMESPACES声明一个默认命名空间时,我会在使用FOR XML的嵌套查询的任何顶级节点中复制命名空间decleration,我偶然发现了几个解决方案,但我并不完全相信.. .

这是一个完整的例子

/*
drop table t1
drop table t2
*/
create table t1 ( c1 int, c2 varchar(50))
create table t2 ( c1 int, c2 int, c3 varchar(50))
insert t1 values 
(1, 'Mouse'),
(2, 'Chicken'),
(3, 'Snake');
insert t2 values
(1, 1, 'Front Right'),
(2, 1, 'Front Left'),
(3, 1, 'Back Right'),
(4, 1, 'Back Left'),
(5, 2, 'Right'),
(6, 2, 'Left')



;with XmlNamespaces( default 'uri:animal')
select 
    a.c2 …
Run Code Online (Sandbox Code Playgroud)

xml sql sql-server-2008

16
推荐指数
2
解决办法
1万
查看次数

确定是否正在使用GAC和NGen组件

如何在没有Loader在运行时验证程序集的签名,甚至使用GAC的程序集的情况下确定是否正在使用Native映像?

我有一个复杂的系统,我们正在试验NGen但是目前我们正在运行来自所有DLL所在的文件夹的exe由于很多后期绑定依赖性,看着Process Explorer,它看起来像Native图像正在使用,但我怎么能确定我得到了全部的好处并取消了Loader Verification步骤?

干杯,格雷姆.

更新: 我从Assembly Binding Log查看器中获得了很多这样的东西:

LOG: [Level 1]Start validating IL dependency MyCompany.Entities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7cd8595f4671c5dd.
LOG: Dependency evaluation succeeded.
Run Code Online (Sandbox Code Playgroud)

最后

LOG: Validation of dependencies succeeded.
LOG: Start loading all the dependencies into load context.
LOG: Loading of dependencies succeeded.
LOG: Bind to native image succeeded.
Native image has correct version information.
Attempting to use native image C:\Windows\assembly\NativeImages_v2.0.50727_32\MyCompany.Mylibrary#\4710bb8309419d707681bd360088181f\MyCompany.MyLibrary.MyClass.ni.dll.
ZAP: Native image has been relocated.
Native image successfully used.
Run Code Online (Sandbox Code Playgroud)

所以它使用Native图像但仍在验证它们,即不使用GAC版本,即使这是我创建Native图像的地方,如下所示:

ngen install "MyCompany.Entites, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7cd8595f4671c5dd, processorArchitecture=MSIL"
Run Code Online (Sandbox Code Playgroud)

脚注: …

.net ngen

12
推荐指数
1
解决办法
4825
查看次数

访问绑定到DataGridView行的项(WinForms)

如何访问绑定到自定义集合的DataGridView的特定行的绑定项?

.net datagridview winforms

11
推荐指数
1
解决办法
5015
查看次数

使用WS-Security的WCF服务仅需要签名时间戳

我需要向第三方提供服务,该服务将发送带有签名时间戳的soap消息.

如何配置我的服务以支持此功能?

更新 我已经设法接近我们所追求的Soap消息的格式,但WCF坚持同时签署用户名和时间戳令牌,有没有办法修改绑定只签署时间戳?


进一步更新 以下是我们的要求:

  • 时间戳元素必须签名.
  • 用于签名的证书上的CN名称必须与UsernameToken元素中的用户名给出匹配.
  • 用于签名的证书必须在BinarySecurityToken元素中发送.
  • KeyInfo元素必须只包含一个SecurityTokenReference元素,该元素必须用于引用BinarySecurityToken.
  • 必须指定规范化算法.
  • 必须指定SignatureMethod,并且必须是SHA-1或SHA-2算法.
  • 应该使用分离的签名.

有什么建议?

当前配置

客户端绑定

<bindings>
  <wsHttpBinding>
    <binding name="WSBC">
      <security mode="TransportWithMessageCredential">
        <transport clientCredentialType="Certificate" proxyCredentialType="None"></transport>
        <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
Run Code Online (Sandbox Code Playgroud)

客户端端点

<client>
  <endpoint address="https://localhost/WcfTestService/Service2.svc"
  behaviorConfiguration="CCB" binding="wsHttpBinding"
  bindingConfiguration="WSBC"
  contract="ServiceReference2.IService2"
  name="wsHttpBinding_IService2" />
</client>
Run Code Online (Sandbox Code Playgroud)

客户行为

<behaviors>
  <endpointBehaviors>
    <behavior name="MBB">
      <clientCredentials>
        <clientCertificate  findValue="03 58 d3 bf 4b e7 67 2e 57 05 47 dc e6 3b 52 7f f8 66 d5 2a"
                            storeLocation="LocalMachine"
                            storeName="My"
                            x509FindType="FindByThumbprint" />
        <serviceCertificate>
          <defaultCertificate findValue="03 58 …
Run Code Online (Sandbox Code Playgroud)

wcf ws-security

9
推荐指数
2
解决办法
4855
查看次数

在UI线程上编组的方法是否需要是线程安全的

如果我在UI上调用一个方法线程是否由Windows消息队列进行搜索,随后不需要重入?

    private void CalledFromWorkerThread()
    {
        //changed from 'InvokeRequired' Anti-Pattern
        this.Invoke((Action) (() => _counter++; /* Is this ok? */ ));
    }
Run Code Online (Sandbox Code Playgroud)

澄清:只有UI线程才会访问_counter.

c# multithreading winforms

9
推荐指数
1
解决办法
183
查看次数

在SQL server中学习XQuery()

SQL Server 2008 sp2

我是初学者,发现XQuery语法特别是XPath非常具有挑战性.例如,尝试使用各种xml方法,如exists(),nodes(),value()等....

是否有一个很好的在线教程或您推荐的书籍?

sql-server sql-server-2008 xquery-sql

7
推荐指数
1
解决办法
1万
查看次数

大有多大?(开发团队)

我对大团队的构成以及开发人员,建筑师,测试人员,经理等的比例感兴趣.

有没有人在像Windows或SQL Server等众所周知的项目中拥有团队规模的数据?

project-management

6
推荐指数
2
解决办法
2164
查看次数

确定用户是否正在从公司机器访问 Web 应用程序

我正在与一个使用 Office 365 的大型企业客户合作,我们有一个在 azure 中运行的应用程序,如果他们没有从他们的公司机器登录,我们需要阻止某些操作。

原则上,当用户不使用公司管理的笔记本电脑时,我们希望禁用“导出为 Excel”功能。

例如,如果我尝试从我的家用机器登录 OUTLOOK,我会得到下面的图像,我怎样才能为我们的应用程序实现类似的功能?

在此处输入图片说明

office365

5
推荐指数
1
解决办法
202
查看次数