Microsoft OLE DB Provider for ODBC Drivers error '80004005' when adding new site to IIS 7 when driver works for another site?

Microsoft OLE DB Provider for ODBC Drivers error '80004005' when adding new site to IIS 7 when driver works for another site?

我有一个网站可以正常使用我的域名(假设它是 https://mydoman1.se), and now I want to change the domainname to a new one (https://mydomain2.se) but still have https://mydoman1.se and redirect that to https://mydoman2.se

所以我添加了一个新站点(https://mydomain2.se) in the IIS and copied all the setting for the new site from the old site(https://mydomain1.se) 他们都指向并使用相同的 index.asp 页面。

我使用这个连接:

ConnString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER='localhost';Port=3306; DATABASE='db_name'; " &_
"UID='uname';PASSWORD='pwd'; OPTION=3;"

如果我加载 https://mydomain1.se it works as it should, but if I load https://mydomain2.se 然后我得到一个错误,它找不到连接?

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] 
Data source name not found and no default driver specified

我还添加了一个系统 DSN,在测试它时,它可以正常连接。那么,为什么当我知道我添加了它时它却找不到它?

我不明白为什么 https://mydomain1.se 有效而不是新的,它们都使用相同的索引文件和连接?

我错过了什么?跟32位和64位系统有关系吗? 非常感谢任何输入,谢谢。

解决它的问题是在 IIS 的应用程序池中设置 "Activate 32 bits programs" 以便找到 DSN。

我们的一位客户遇到了同样的问题。我已将 Enable 32 bit application 设置为 true 并且已针对给定错误解决了他的问题。