简体   繁体   English

使用Windows Installer部署Web应用程序期间出错

[英]Error during Web application deploy using windows installer

I have made the Web application setup package using windows installer, This package hosts application in IIS and Install Database on sql server. 我已经使用Windows Installer制作了Web应用程序安装程序包,该程序包将应用程序托管在IIS中,并在sql服务器上安装数据库。 It was working fine previously but suddenly i am getting following error and database not deploying on Sql server but IIS Deployment was successful. 以前它工作正常,但突然我收到以下错误,数据库未部署在Sql服务器上,但IIS部署成功。 I am getting following error in Log File 我在日志文件中收到以下错误

20.01.2017 13:41:53 System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. 20.01.2017 13:41:53 System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.SqlServer.BatchParser,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。 File name: 'Microsoft.SqlServer.BatchParser, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) at Microsoft.SqlServer.Management.Common.ServerConnection.GetStatements(String query, ExecutionTypes executionType, Int32& statementsToReverse) at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType) at UpdatingWebconfig.Installer1.ExecuteSqlsecond(String strScript, String serverName, String dbName, String userName, String password) WRN: Assembly binding logging is turned OFF. 文件名:System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly程序集,字符串名称,布尔型throwOnError,布尔型ignoreCase,ObjectHandleOnStack类型)位于Microsoft.SqlServer.BatchParser,Version = 11.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91 .Reflection.RuntimeAssembly.GetType(字符串名称,布尔throwOnError,布尔ignoCase)在System.Reflection.Assembly.GetType(字符串名称,布尔throwOnError)在Microsoft.SqlServer.Management.Common.ServerConnection.GetStatements(字符串查询,ExecutionTypes执行类型, Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(Int32&statementToReverse)(UpdatingWebconfig.Installer1.ExecuteSqlsecond(String strScript,String serverName,String dbName,String userName,String password)处的WRN:程序集绑定日志记录关掉。 To enable assembly bind failure logging, set the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. 要启用程序集绑定失败日志记录,请将注册表值[HKLM \\ Software \\ Microsoft \\ Fusion!EnableLog](DWORD)设置为1。注意:程序集绑定失败日志记录会降低性能。 To turn this feature off, remove the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog]. 要关闭此功能,请删除注册表值[HKLM \\ Software \\ Microsoft \\ Fusion!EnableLog]。

Here you have a possible solution: 这里有一个可能的解决方案:

might be the SQL Server is 32bit and the Windows is 64bit. 可能是SQL Server是32位,而Windows是64位。

Because of your Windows is 64bit, when the 64bit application started, it will call the assembly of 64bit, but the SQL Server Installation is 32bit and the 64bit assembly might be not included, so you should make sure that you have both Microsoft.SQLServer.BatchParser of 32bit and 64bit. 因为您的Windows是64位,所以在启动64位应用程序时,它将调用64位程序集,但是SQL Server安装是32位,并且可能不包括64位程序集,因此您应确保同时拥有Microsoft.SQLServer。 32位和64位的BatchParser。 You could confirm this by following steps: 您可以按照以下步骤进行确认:

  1. Open C:\\Windows\\assembly 打开C:\\ Windows \\ assembly

  2. Find Microsoft.SQLServer.BatchParser, there should be two. 找到Microsoft.SQLServer.BatchParser,应该有两个。

  3. Right-click on them, make sure that one of them is AMD64 and another is X86. 右键单击它们,确保其中一个是AMD64,另一个是X86。

If you couldn't find the Microsoft.SQLServer.BatchParser of 64bit, please download and install Microsoft SQL Server 2008 R2 Shared Management Objects, because of the Microsoft.SqlServer.BatchParser assembly is included in Microsoft SQL Server SMO. 如果找不到64位的Microsoft.SQLServer.BatchParser,请下载并安装Microsoft SQL Server 2008 R2共享管理对象,因为Microsoft SQL Server SMO中包含Microsoft.SqlServer.BatchParser程序集。

reference: link 参考: 链接

Hope this help! 希望有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows Installer for WinForms应用程序期间如何获取用户输入? - How to get user input during windows installer for WinForms application? Windows应用程序和服务安装程序 - windows application & service installer 需要添加/更改哪些程序集才能将Silverlight Web应用程序部署到Windows Azure [错误]? - What assemblies do need to add/change to deploy silverlight web application to Windows Azure [Error]? 如何使用Windows Azure Pack将WCF作为云服务部署Web应用程序? - How to deploy a web application with WCF as a cloud service using Windows Azure Pack? 通过Windows窗体应用程序以编程方式部署Web应用程序 - Programmatically deploy a web application via a Windows form application 在Windows应用程序中添加新的安装程序类得到编译器错误 - Adding new installer class in windows application getting compiler error 在Windows应用程序中添加新的安装程序类得到编译器错误 - Adding new installer class in windows application getting compiler error 通过控制台应用程序使用Microsoft Web Deploy - Using Microsoft Web Deploy through Console Application 如何使用installshield部署Web应用程序? - How to Deploy web application using installshield? 使用 Wix 在 c# 中为 Web 应用程序创建安装程序 - Create a installer for web application in c# using Wix
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM