日期:2014-05-18  浏览次数:20630 次

asp.net2.0+mysql(Connector/Net5) 网站发布需要安装什么?为什么数据库连接的页面出现错误?
使用Connector/Net5 连接数据库
mysql的版本是4, 

1. Mysql.data.dll已经放在bin目录下。
2. framework2已经安装。

asp.net+c#在vs2005里面调试程序都很好,但是发布之后运行的时候,有数据库操作的页面出现了如下错误:

Unable to find the requested .Net Framework Data Provider. It may not be installed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1374215
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +63
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +19
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +120
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92
System.Web.UI.WebControls.ListControl.PerformSelect() +31
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26
 
难道还有什么东西没有安装?
ODBC .NET Data Provider?Connector/Net5 ?



------解决方案--------------------
IIS虚拟网站的建立 
由于这个web管理工具具有很高的权限,为了安全性考虑,需要将其部署在内网环境中,外网用户是不能访问的。
所以需要在IIS中新建一个网站(XP自带的IIS不能建立多个网站?)。
首先建立一个本地目录,里面放置页面文件。然后建立一个网站。有几个默认参数需要改变一下,不然是不能进行asp.net访问的。
在网站主目录中,要勾上:读取,目录浏览,记录访问,索引资源
在执行权限中选择:纯脚本。
访问地址如下:http://192.168.1.2:5150,后面不需要跟虚拟网站的名称。


有时候还可能权限的问题 !!!
------解决方案--------------------
MYSQL官方下载相应的驱动

------解决方案--------------------
4和5不一样吧
------解决方案--------------------
IIS上的(asp.net)选定版本是不是相应的开发版本