社区
C#
帖子详情
高分 求助 c# 调用 truststore格式 证书
iamseason
2013-12-25 05:25:17
和工行做接口对接,给我发一个truststore后缀的证书,但是当我执行代码的时候报错“找不到申请的对象。”
是我的方法不对?
HttpWebRequest httpRequest.ClientCertificates.Add(new X509Certificate2("D:\OTS.truststore", "123"));
请问各位大侠,有对接过用过类似证书的指点迷津。谢谢。
...全文
348
11
打赏
收藏
高分 求助 c# 调用 truststore格式 证书
和工行做接口对接,给我发一个truststore后缀的证书,但是当我执行代码的时候报错“找不到申请的对象。” 是我的方法不对? HttpWebRequest httpRequest.ClientCertificates.Add(new X509Certificate2("D:\OTS.truststore", "123")); 请问各位大侠,有对接过用过类似证书的指点迷津。谢谢。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
11 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
提阿菲罗
2016-08-26
打赏
举报
回复
同样的问题 C# 如何调用truststore证书 急急急!
Eric沈
2013-12-31
打赏
举报
回复
我也是做工行的对接,出现这个问题
Eric沈
2013-12-31
打赏
举报
回复
我的证书的后缀与你的一样,我昨天又问工行的人,他们的证书是什么格式,他说是PFX格式,我在怀疑他是否给错证书了 ,这个 truststore后缀的证书是证书仓库,一般是放在tomcar里面,由tomcar读取的!
iamseason
2013-12-31
打赏
举报
回复
楼上,你是什么格式的证书,这个可以互转吗
iamseason
2013-12-31
打赏
举报
回复
我正在向他们寻找帮助,有什么方案届时告诉你
iamseason
2013-12-30
打赏
举报
回复
周一早上顶起
Eric沈
2013-12-30
打赏
举报
回复
同求啊,使用X509Certificate cert = new X509Certificate(path, psw, X509KeyStorageFlags.MachineKeySet); 这样获取,就报错, 未处理System.Security.Cryptography.CryptographicException Message=找不到申请的对象。 Source=mscorlib StackTrace: 在 System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) 在 System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName) 在 System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) 在 System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags) 在 UnionMallSync.ICBC.ICBCApi.DoGet(String posdata) 位置 d:\EricSource\TIGER\Eshop2010.root\UnionMall\Projects\UnionMallSync\ICBC\ICBCApi.cs:行号 151 在 UnionMallSync.ICBC.ICBCApi.apiclick(String method, String data) 位置 d:\EricSource\TIGER\Eshop2010.root\UnionMall\Projects\UnionMallSync\ICBC\ICBCApi.cs:行号 130 在 UnionMallSync.ICBC.ICBCOrder.test() 位置 d:\EricSource\TIGER\Eshop2010.root\UnionMall\Projects\UnionMallSync\ICBC\ICBCOrder.cs:行号 101 在 UnionMallPRO.test.button205_Click(Object sender, EventArgs e) 位置 d:\EricSource\TIGER\Eshop2010.root\UnionMall\Projects\UnionMallPRO\test.cs:行号 2398 在 System.Windows.Forms.Control.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ButtonBase.WndProc(Message& m) 在 System.Windows.Forms.Button.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) 在 System.Windows.Forms.Application.Run(Form mainForm) 在 UnionMallPRO.Program.Main() 位置 d:\EricSource\TIGER\Eshop2010.root\UnionMall\Projects\UnionMallPRO\Program.cs:行号 17 在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 在 System.Threading.ThreadHelper.ThreadStart_Context(Object state) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart() InnerException:
iamseason
2013-12-26
打赏
举报
回复
谢谢楼上,一般证书是pfx格式的,但是他提供的是truststore后缀的。没有遇到过。有了解的大侠吗?
iamseason
2013-12-26
打赏
举报
回复
大侠们都没起么?昨晚太累?
likofans
2013-12-25
打赏
举报
回复
你可以看看这个,
http://q.cnblogs.com/q/54288/
iamseason
2013-12-25
打赏
举报
回复
对方给的实例都是java的,网上资料很少。
C#
通过Aforge
调用
电脑摄像头(附代码)
C#
标准库本身不带有能
调用
电脑摄像头的库,如果利用windows自身的API来实现的话,着实有些麻烦。Aforge这个第三方库能很好的实现
调用
、处理的功能。 PS:文末给大家分享了完整的项目源码,各位最好先下载下来,对照着来看 1、先看一下效果 2、Aforge介绍 AForge.NET是一个专门为开发者和研究者基于
C#
框架设计的,这个框架提供了不同的类库和关于类库的资源,还有很多应用程序例子,包括计算机视觉与人工智能,图像处理,神经网络,遗传算法,机器学习,机器人等领域。 3、我使用的开发环境 操作系统
c#
使用扫描仪
最近有个项目,需呀
调用
扫描仪。 我们这里使用微软wia组件,
调用
扫描仪,去扫描图像。 先引用这个组件,这个组件是个com组件。
调用
扫描仪的代码,很简单,返回一个ImageFile接口。这个ImageFile就是扫描后的图像文件。 public ImageFile Scan() { ImageFile image; try { Common
IDL学习——
调用
enviTask对
高分
2号影像进行预处理
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 注:该程序是在ENVI5.3+IDL8.5中进行,而ENVI5.3不支持国产卫星的打开,可到ENVI官网上下载envi_china_satellites_support该扩展工具进行打开与处理。 本实例实现利用IDL
调用
ENVITask实现
高分
2号影像的预处理。
高分
2号的预处理流程是...
PKCS7
证书
格式
pkcs#7是“Cryptographic Message Syntax Standard”,在第一部分的“Scope”中,提到“This standard describes a general syntax for data that may have cryptography applied to it, such as digital signatures and digital enve...
C#
wpf 使用WriteableBitmap渲染视频
文章目录前言一、如何实现?1.创建WriteableBitmap2.关联Image3写入数据三、示例1.示例代码2.效果预览四、像素
格式
的讨论五、性能对比总结 前言 通过《
C#
wpf 使用d3d渲染yuv视频数据》我们实现了在Image控件中显示视频,解决了控件绘制不兼容问题。但如果有时候不想依赖D3D时,还有一种方案实现视频的渲染,使用wpf的WriteableBitmap,WriteableBitmap的祖先接口有ImageSource,即可以作为Image的Source显示画面。我们只需往Writ
C#
110,565
社区成员
642,567
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章