Answered by:
ERROR [HY024] [Microsoft][ODBC Text Driver] '(unknown)' is not a valid path

Question
-
User1365335561 posted
Hi Guys,
I just recently installed Visual Studio 2012 and created an ASP.net Web Application project to connect to a local csv file over ODBC. It runs fine in Visual STudio, but as soon as I publish it, I get the error "ERROR [HY024] [Microsoft][ODBC Text Driver] '(unknown)' is not a valid path". Some pointers would be appreciated.
Thanks
OS= Win7 Professional 32bit
Software = Visual STudio 2012
WebForm1.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1" %> <%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body style="height: 185px"> <form id="form1" runat="server"> <div style="height: 30px">Test<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1"> <Series> <asp:Series Name="Series1" XValueMember="Status" YValueMembers="Total"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"> </asp:ChartArea> </ChartAreas> </asp:Chart> </div> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [report-88.csv]"></asp:SqlDataSource> </form> </body> </html>
Web.config. System dsn points to csv in "C:\Users\zgibson\Documents\Spice"
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="ConnectionString" connectionString="Dsn=Tickets" providerName="System.Data.Odbc" /> </connectionStrings> <appSettings> <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /> </appSettings> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="ChartImageHandler" /> <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </handlers> </system.webServer> <system.web> <httpHandlers> <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /> </httpHandlers> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </controls> </pages> <compilation debug="true" strict="false" explicit="true" targetFramework="4.5"> <assemblies> <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies> </compilation> <httpRuntime targetFramework="4.5"/> </system.web> </configuration>
Monday, November 4, 2013 5:30 PM
Answers
-
User1079421601 posted
Please refer
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, November 4, 2013 9:48 PM
All replies
-
User-1716253493 posted
http://www.connectionstrings.com/Monday, November 4, 2013 9:41 PM -
User1079421601 posted
Please refer
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, November 4, 2013 9:48 PM -
User1365335561 posted
Hi Guys,
Thanks. Checking the Eventviewer I noticed the error below. After giving this account rights to the source folder it worked. It appears that you need to enter the entire account name "IIS APPPOOL\ASP.NET v4.0" in order for it to be found under the security tab. Previously permission was only assigned to IUSR.
Eventviewer
Process information:
Process ID: 1312
Process name: w3wp.exe
Account name: IIS APPPOOL\ASP.NET v4.0Tuesday, November 5, 2013 12:39 AM