小编Ngu*_*ắng的帖子

WCF上的X.509证书?

问题:

我正在一台机器上开发这个程序.

该服务在开发服务器中工作正常,但是当我尝试在IIS中托管服务时,它给出了一个错误:

使用以下搜索条件找不到X.509证书:StoreName'My',StoreLocation'InfurrentUser',FindType'FindBySubjectName',FindValue'WCFServer'.

那么我还能解决这个问题吗?我正在尝试这个代码

http://www.codeproject.com/KB/WCF/9StepsWCF.aspx

证书创建

makecert.exe -sr CurrentUser -ss My -a sha1 -n CN=WCfServer -sky exchange -pe
makecert.exe -sr CurrentUser -ss My -a sha1 -n CN=WcfClient -sky exchange -pe
Run Code Online (Sandbox Code Playgroud)

证书存在于MMC中的Personal and Trusted People文件夹中

Service有一个函数接受一个数字并返回字符串并且工作正常

这是我的服务web.config:

<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpEndpointBinding">
          <security>
            <message clientCredentialType="Certificate" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="WCFServiceCertificate.Service1" behaviorConfiguration="WCFServiceCertificate.Service1Behavior">
        <!-- Service Endpoints -->
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" contract="WCFServiceCertificate.IService1">
          <!--
              Upon deployment, the following identity element should be removed or replaced to reflect the
              identity under …
Run Code Online (Sandbox Code Playgroud)

c# wcf web-services

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

WPF中的MediaElement从流播放视频?

我有一个元素:

<MediaElement x:Name="bgvideo" Width="800" Height="600" />
Run Code Online (Sandbox Code Playgroud)

我有一个视频流:

Stream stream = obj.GetFileStream();
Run Code Online (Sandbox Code Playgroud)

我想使用流对象来源MediaElement,但默认MediaElement 使用source属性.

c# wpf video

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

标签 统计

c# ×2

video ×1

wcf ×1

web-services ×1

wpf ×1