惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Engineering at Meta
Engineering at Meta
I
InfoQ
L
LangChain Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
WordPress大学
WordPress大学
P
Privacy & Cybersecurity Law Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Last Watchdog
The Last Watchdog
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
SegmentFault 最新的问题
爱范儿
爱范儿
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
AI
AI
T
Tor Project blog
I
Intezer
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
N
News and Events Feed by Topic
Latest news
Latest news
S
Security Affairs
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
S
Securelist

博客园 - calmzeal

微软更新导致的IIS7设置默认主页无效 【原创】Superset在windows下的安装配置 解决 Linux error while loading shared libraries: cannot open shared object file: No such file or directory 记录一次服务器CPU 100%的解决过程 sql行转列 VS2010发布.NET2.0网站,出现“未预编译文件* 因此不能请求该文件”的解决办法 在 64 位版本的 Windows 上IIS ASP NET不支持JET4 问题 wse [Web 开发] 定制IE下载对话框的按钮(打开/保存) 【IE信息栏问题】本地html文件js被IE阻止的一些解决方法 分享一个js Tree - dTree SqlPlus Set常用设置 OleDB Transaction ORA-01000: maximum open cursors exceeded 超出打开游标的最大数 【转】神呀~~,给我个"本地数据库的替换方案"吧! 【CLR Via C#笔记】操作符重载 C#单件模式 【CLR Via C#笔记】 类型对象 【CLR Via C#笔记】 值类型与拆装箱、参数传递 [转] CSS完美兼容IE6/IE7/FF的通用方法
Google Review中Zlib.Portable报错的一种排查解决方案
calmzeal · 2017-03-15 · via 博客园 - calmzeal

前几天遇到一个恶心的问题,跟同事一块解决了,在这里记录下过程。

比较懒,直接转他的blog:

http://www.cnblogs.com/caochenghua/p/6530053.html

报错信息如下

“System.IO.FileNotFoundException”类型的异常在 Google.Apis.dll 中发生,但未在用户代码中进行处理

其他信息: 未能加载文件或程序集“Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=431cba815f6a8b5b”或它的某一个依赖项。系统找不到指定的文件。

项目中已经包含了Zlib.Portable.dll ,查看了文件属性,确认版本号已经保持一致

使用PowerShell查看现有Dll的PublicKeyToken,发现是未强签名版本。

1   ([system.reflection.assembly]::loadfile("D:\Web\bin\Zlib.Portable.dll")).FullName
2  
3  Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null

那原因应该就在这里了,

找到https://github.com/google/google-api-dotnet-client-samples代码并下载

用Visual Studio打开下载的项目,点项目-》管理NuGet程序包,提示自动更新依赖的DLL文件,更新完成

此时,我们需要的Zlib.Portable.dll已经可以在文件夹中显示了:google-api-dotnet-client-samples-master\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid

打开Windows PowerShell使用以下命令比较新生成的Zlib.Portable.dll和原有的项目中Zlib.Portable.dll :

复制代码

1 ([system.reflection.assembly]::loadfile("D:\Zlib.Portable.dll")).FullName
2 
3 Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=431cba815f6a8b5b
4 
5  ([system.reflection.assembly]::loadfile("D:\Web\bin\Zlib.Portable.dll")).FullName
6 
7 Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null

复制代码

区别是后者PublicKeyToken=null前者不是,至此原因大概明了,没有强签名的dll已经不能使用了,Google Review API对此进行了更加严格的限制是导致报错的原因吧

把新生成的Zlib.Portable.dll替换到服务器上,报错果然消失了!恢复正常