小编Dav*_*itt的帖子

什么时候可以打破CLS合规?

我想知道哪些边缘情况可以使公共语言规范符合性.即使不打算从其他语言访问,我认为这些原则CLSCompliantAttribute是良好的最佳实践.

您是否遇到过YAGNI超过最佳实践的案例?

.net cls-compliant

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

用于生成指纹的openssl的Ruby代码

我需要以下的红宝石:

openssl x509 -sha1 -fingerprint -noout -in cert.pem
Run Code Online (Sandbox Code Playgroud)

我写的代码是:

data = File.read("cert.pem")
data["-----BEGIN CERTIFICATE-----\n"]=""
data["-----END CERTIFICATE-----\n"]=""
OpenSSL::Digest::SHA1.new(Base64.encode64(data))
Run Code Online (Sandbox Code Playgroud)

此代码不会生成与openssl cli命令相同的指纹.

知道我可能做错了吗?

ruby base64 openssl sha1 fingerprint

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

C#:找到当前进程

如何在不使用系统进程的情况下获取当前运行的应用程

c#

0
推荐指数
1
解决办法
1926
查看次数

配置和使用WCFExtras - WCF/C#/ VS2008

我在StackOverflow上的另一篇文章中关注了这个链接:

WCFExtras

这是我的WCF服务库中的app.config.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="TestClient.Service.Service1Behavior"
        name="TestClient.Service.SearchService">
        <endpoint address="" behaviorConfiguration="Sample.WsdlSampleEndpointBehavior" binding="basicHttpBinding" bindingConfiguration=""
          contract="TestClient.Service.ISearchService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8731/TestClient.Service/Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="Sample.WsdlSampleEndpointBehavior">
          <wsdlExtensions location="http://localhost:8731/TestClient.Service/Service1/"/> …
Run Code Online (Sandbox Code Playgroud)

c# wcf

0
推荐指数
1
解决办法
3913
查看次数

标签 统计

c# ×2

.net ×1

base64 ×1

cls-compliant ×1

fingerprint ×1

openssl ×1

ruby ×1

sha1 ×1

wcf ×1