(vb)数据绑定时出现错误“无法找到请求的.Net Framework数据提供程序”

时间:2018-06-21 16:03:20

标签: asp.net vb.net

我正在编写一个Web应用程序,该部分包含字符串列表,并将它们绑定到asp.net中继器。以下是执行此操作的代码区域的片段:

stationinstructions.aspx.vb

'listOfFiles is a list of strings
    Me.rptFiles.DataSource = listOfFiles
    Me.rptFiles.DataBind()

stationinstructions.aspx

<asp:Repeater ID="rptFiles" runat="server">
                  <HeaderTemplate>
                       <ul>
                  </HeaderTemplate>
                  <ItemTemplate>
                              <div id="color1"><li><a href="javascript:getfile('<%# Eval("Name") %>')"><%# Eval("Name") %></a></li></div>
                              <div id="color2"><b p><%# Eval("Name") %></b></div>
                  </ItemTemplate>
                  <FooterTemplate>
                       </ul>
                  </FooterTemplate>
            </asp:Repeater>

我确信我在配置文件中使用了正确版本的.net框架。这是我经过“ Me.rptFiles.DataBind()”时得到的确切错误消息:

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) +1042671
   System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +68
   System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +22
   System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +11
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +93
   System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +278
   System.Web.UI.WebControls.ListControl.PerformSelect() +37
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
   System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +23
   System.Web.UI.Control.PreRenderRecursiveInternal() +88
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

我应该从哪里开始寻找导致错误的原因?

0 个答案:

没有答案