Could not load file or assembly ‘Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. 系统找不到指定的文件

Server Error in ‘/’ Application.
——————————————————————————–

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly ‘Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. 系统找不到指定的文件。

Source Error:
Line 25:             以标识传入的用户。
Line 26:         –>
Line 27:     <add assembly=”Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C”/>
Line 28:     <add assembly=”Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C”/>
Line 29:     <add assembly=”office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C”/>
 

Source File: D:\wz\soft\web\web.config    Line: 27

Assembly Load Trace: The following information can be helpful to determine why the assembly ‘Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ could not be loaded.
WRN: Assembly binding logging is turned OFF.
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.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
——————————————————————————–
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

解决方法:

安装office2007 (推荐专业版,安装的时候尽量选择“立即安装”不要选择“自定义”)

网站需要加载office2007的excel组件,服务器上没有,所以报错!

配置mysql数据库双向同步

       mysql数据库的双向同步其实就是将主从的配置关系,在单向基础上颠倒过来配置一遍。
比如数据库s1和s2,s1的角色变成了主+从,s2的角色变成了从+主
配置方法如下:
S1配置:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

#A TO B
log-bin=mysql-bin
server-id=1
binlog-do-db=NQ

#B TO A
server-id=1
master-host=192.168.1.3
master-user=root
master-password=root
master-port=3306
master-connect-retry=60
replicate-do-db=NQ

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

S2配置:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

#A TO B
server-id=2
master-host=192.168.1.2
master-user=root
master-password=root
master-port=3306
master-connect-retry=60
replicate-do-db=NQ

#B TO A

log-bin=mysql-bin
binlog-do-db=NQ

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
大家可以参考/usr/share/mysql/my-huge.cnf的配置文件,并且其中有相关的注释,可以明白各参数作用。
在此就不讲双向同步的配置代码含义了。
在s1和s2中通过phpmyadmin进行测试,双向都能同步成功即可。