简体   繁体   English

为IIS 7.5 .NET应用安装MS SQL 2005驱动程序

[英]Installing MS SQL 2005 drivers for IIS 7.5 .NET apps

I don't normally do .NET development but I have a small .NET app that I need to set up on a new Win2K8 IIS 7.5 server, the SQL 2005 server is on a different box. 我通常不进行.NET开发,但是我有一个小型的.NET应用程序,需要在新的Win2K8 IIS 7.5服务器上进行设置,而SQL 2005服务器则在不同的盒子上。 I've tested the .NET app on an Win7 IIS 7/SQL 2005 machine and it works fine. 我已经在Win7 IIS 7 / SQL 2005计算机上测试了.NET应用程序,它运行良好。 When I run the app on the new server I get the following error: 在新服务器上运行应用程序时,出现以下错误:

The 'SQLNCLI11' provider is not registered on the local machine.

I googled the error and found out that I needed to install the native client drivers. 我在错误中进行了搜索,发现需要安装本机客户端驱动程序。 I found the sqlncli.msi file on the database server and installed it on the IIS server. 我在数据库服务器上找到了sqlncli.msi文件,并将其安装在IIS服务器上。 Same problem. 同样的问题。 I then installed the SQL Management Studio thinking that might have some drivers that it needed. 然后,我安装了SQL Management Studio,以为可能需要一些驱动程序。 Same error. 同样的错误。 I can connect through the management studio but the .NET app keeps giving me the same error. 我可以通过Management Studio进行连接,但是.NET应用程序不断给我同样的错误。

Any suggestions? 有什么建议么?

Thank! 谢谢!

I changed the provider in my connection string from SQLNCLI11 to SQLNCLI10. 我将连接字符串中的提供程序从SQLNCLI11更改为SQLNCLI10。
Works like a charm. 奇迹般有效。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM