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

推荐订阅源

S
Secure Thoughts
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Project Zero
Project Zero
A
About on SuperTechFans
罗磊的独立博客
WordPress大学
WordPress大学
月光博客
月光博客
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
AI
AI
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
T
Tor Project blog
V
Vulnerabilities – Threatpost
C
Cisco Blogs
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MyScale Blog
MyScale Blog
雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
Forbes - Security
Forbes - Security
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
博客园 - 叶小钗
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Simon Willison's Weblog
Simon Willison's Weblog
C
CERT Recently Published Vulnerability Notes
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

博客园 - 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替换到服务器上,报错果然消失了!恢复正常