1. 症状

您的SharePoint 2010的服务器是不是最近一直出现这个错误呢?

Could not load file or assembly 'Microsoft.Office.InfoPath, Version=14.0.0.0' (...)

特别是当我们部署新的InfoPath解决方案时,我们突然之间发现,无法把模板上传到服务器当中去了,但是我们发现在GAC中,这个Microsoft.Office.InfoPath.dll 是存在的

问题出在哪里?

2.分析过程

在日志中有这么一句话:

System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.Office.InfoPath, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system
cannot find the file specified.

根据前文分析,文件是一定存在的,但为什么呢,我们继续打开编译日志文件


报告如下:

*** Assembly Binder Log Entry (4/12/2012 @ 12:51:23) ***
The operation failed.
Bind result: hr = 0x80131040. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = WINDEVSP2010\SPInstaller
LOG: DisplayName = Microsoft.Office.InfoPath, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
(Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/wss/VirtualDirectories/80741441fc-0d39-48f0-954e-96614c358095/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\wss\VirtualDirectories\80741441fc-0d39-48f0-954e-96614c358095\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\ef3f51d0
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\ef3f51d0
LOG: AppName = a6d35fbc
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\inetpub\wwwroot\wss\VirtualDirectories\80741441fc-0d39-48f0-954e-96614c358095\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Publisher policy file is found at
C:\Windows\assembly\GAC_MSIL\Policy.14.0.Microsoft.Office.InfoPath\15.0.0.0__71e9bce111e9429c\Policy.14.0.Microsoft.Office.InfoPath.config.
LOG: Publisher policy file redirect is found: 14.0.0.0 redirected to 15.0.0.0.
LOG: ProcessorArchitecture is locked to MSIL.
LOG: Post-policy reference: Microsoft.Office.InfoPath, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c,
processorArchitecture=MSIL
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary
ASP.NET Files/root/ef3f51d0/a6d35fbc/Microsoft.Office.InfoPath.DLL.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary
ASP.NET
Files/root/ef3f51d0/a6d35fbc/Microsoft.Office.InfoPath/Microsoft.Office.InfoPath.DLL.
LOG: Attempting download of new URL
file:///C:/inetpub/wwwroot/wss/VirtualDirectories/80741441fc-0d39-48f0-954e-96614c358095/bin/Microsoft.Office.InfoPath.DLL.
LOG: Assembly download was successful. Attempting setup of file:
C:\inetpub\wwwroot\wss\VirtualDirectories\80741441fc-0d39-48f0-954e-96614c358095\bin\Microsoft.Office.InfoPath.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: Microsoft.Office.InfoPath, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: The assembly reference did not match the assembly definition found.
ERR: Setup failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

现在我们找到原因了!好像是GAC的某个设置把14.00重定向到15.000,但是这个DLL又不支持SharePoint 2010,呵呵。

我们在运行当中打开如下的目录:

C:\Windows\assembly\GAC_MSIL

我发现如下的文件夹:Policy.14.0.Microsoft.Office.InfoPath 有一个子文件夹 “15.0.0.0__71e9bce111e9429c”.

我继续查看web.config文件中的设置,设置中有这么一段:

<?xml version="1.0" encoding="UTF-16"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity publicKeyToken="71e9bce111e9429c" name="Microsoft.Office.InfoPath" culture="neutral"></assemblyIdentity>
<bindingRedirect oldVersion="14.0.0.0" newVersion="15.0.0.0"></bindingRedirect>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

哈哈找到问题了!

3.解决方案

1. 打开“开始-运行” ,输入: C:\Windows\Assembly\GAC_MSIL

2.删除掉如下的文件夹:

Policy.14.0.Microsoft.Office.InfoPath
Policy.14.0.Microsoft.Office.InfoPath.Client.Internal.Host
Policy.14.0.Microsoft.Office.InfoPath.FormControl

3.  运行“ IISRESET /noforce” 重启IIS

哈哈哈,终于可以继续我的InfoPath的部署和开发拉!

安装InfoPath 2013后 SharePoint 2010 出现 “找不到 Microsoft.Office.InfoPath, Version=14.0.0....” 的错误的解决方案的更多相关文章

  1. CentOS7用yum安装wget命令后仍然提示命令找不到的解决方法

    需求:用的AWS实例自带的CentOS7用yum安装wget命令后扔提示命令找不到,后面用源码安装方式解决,下面先讲解决方法,疑问及知识点扩展最后写出 1.问题(因是mini版本系统,有些基本命令扔需 ...

  2. SharePoint 2013 和 SharePoint 2010 功能对比

    微软的网站找东西太麻烦了,在这记录一下. 从 SharePoint 2010 更改为 SharePoint 2013 http://technet.microsoft.com/zh-cn/librar ...

  3. VS编程中找不到Microsoft.Office.Core、Microsoft.Office.Interop.Word和VBIDE

    在使用vs2005. vs2008. vs2010 制作包含 word等office的应用程序时,有时找不到对Microsoft.Office.Core. Microsoft.Office.Inter ...

  4. 安装php扩展后,执行时找不到扩展 class xxx no found

    当编译安装一个新的php扩展,例如安装redis, 安装后 执行 new Redis(), 如果发现找不到class Redis,可以先检查redis.so文件是否在php的扩展目录下, 如果发现是, ...

  5. SQLYOG导入数据时报错,出现找不到Microsoft office 元驱动程式,并且无法安装64位office Access驱动

    当我们使用mysql导入外部数据时(如Excel表),有时会出现如下的错误问题,即找不到64位access驱动.为了解决这个问题,我们需要下载相应的驱动,通过下图中的点击此链接即可进入下载页面(htt ...

  6. 关于SharePoint 2010体系架构的几个话题

    转:http://www.cnblogs.com/chenxizhang/archive/2011/12/18/2291658.html?ADUIN=85650109&ADSESSION=13 ...

  7. 『SharePoint 2010』Sharepoint 2010 Form 身份认证的实现(基于AD)

    一.进管理中心,创建一个应用程序,配置如下: 二.填端口号,和选择form身份认证,以及填写成员和角色,其他都默认就可以了 三.使用SharePoint 2010 Management Shell在里 ...

  8. sharepoint 2010 基于AD的Form验证

    一.新建web应用程序 1.验证部分选择“基于声明的身份验证” 2.设置端口 3.选择“启用基于窗体的身份验证(FBA)” “ASP.NET 成员身份提供程序名称”下面填写“LdapMember” “ ...

  9. SharePoint 2010 ——自定义上传页面与多文件上传解决方案

    最近项目遇到一个很麻烦的问题,原以为很容易解决,结果搞了那么久,先开个头,再慢慢写 SharePoint 2010 ——自定义上传页面与多文件上传解决方案 1.创建Sharepoint空白项目,创建应 ...

随机推荐

  1. Sql Server系列:索引基础

    1 索引概念 索引用于快速查找在某个列中某个特定值的行,不使用索引,数据库必须从第1条记录开始读完整个表,知道找出需要的行.表越大,查询数据所花费的时间越多.如果表中查询的列有索引,数据库能快速到达一 ...

  2. C#设计模式系列:原型模式(Prototype)

    1.原型模式简介 1.1>.定义 原型模式(Prototype)用原型实例指定创建对象的种类,并且通过复制这些原型创建新的对象. 1.2>.使用频率 中 1.3>.原型模式应用 首先 ...

  3. 前端学PHP之运算符

    × 目录 [1]总括 [2]算术运算符 [3]赋值运算符[4]位运算符[5]比较运算符[6]错误控制[7]逻辑运算符[8]字符串连接[9]数组运算符 前面的话 运算符是可以通过给出的一或多个表达式来产 ...

  4. Util应用程序框架公共操作类(五):异常公共操作类

    任何系统都需要处理错误,本文介绍的异常公共操作类,用于对业务上的错误进行简单支持. 对于刚刚接触.Net的新手,碰到错误的时候,一般喜欢通过返回bool值的方式指示是否执行成功. public boo ...

  5. Ubuntu杂记之——JDK、ANT安装、配置

    一.安装JDK 方法一:使用软件源安装openjdk sudo apt-get install openjdk-7-jdk 方法二:使用软件源安装sun jdk sudo apt-get instal ...

  6. RESTful API URI 设计: 判断资源是否存在?

    相关的一篇文章:RESTful API URI 设计的一些总结. 问题场景:判断一个资源(Resources)是否存在,URI 该如何设计? 应用示例:判断 id 为 1 用户下,名称为 window ...

  7. 1Z0-053 争议题目解析520

    1Z0-053 争议题目解析520 考试科目:1Z0-053 题库版本:V13.02 题库中原题为: 520.Which of the following are not disabled by de ...

  8. 1.什么是Code First(EF Code First 系列)

    EF4.1中开始支持Code First .这种方式在领域设计模式中非常有用.使用Code First模式,你可以专注于领域设计,根据需要,为你一个领域的对象创建类集合,而不是首先来设计数据库,然后来 ...

  9. STM32Cube Uart_DMA测试工程

    1.打开软件,新建工程,选择芯片信号,这里选择 2.USART1使能选择"Asynchronous"模式:            3.配置"RCC",High ...

  10. C# 超时工具类 第二版

    附源码,没有附测试demo 之前的工具类:C# 给某个方法设定执行超时时间 /// <summary> /// 超时工具 /// </summary> public class ...