Ciao a tutti ho un problema e vorrei una mano per risolverlo:
il mio codice è questo:
<%@ CompilerOptions='/R:"C:\Programmi\Microsoft.NET\Odbc.Net\Microsoft.d ata.odbc.dll"' %>
<%@ Import Namespace = "Microsoft.Data.Odbc" %>
<%@ Import Namespace="System.Data" %>
<script language="vb" runat="server">
sub Page_Load(obj as object, e as eventargs)
'Creo la connessione al database
dim objConn as OdbcConnection
objConn = New ODBCConnection(" DRIVER=MYSQL;Server=localhost;uid=root;pwd=;databa se=nomeDB")
dim objCmd as new OdbcDataAdapter("Select * from nomeTB", objConn)
dim ds as DataSet = new DataSet()
objCmd.Fill(ds, "nomeTB")
MyDataList.DataSource= ds.Tables("nomeTB"). _
DefaultView
MyDataList.DataBind()
end sub
</script>
<html>
<head>
<title>ASP.NET & MySQL<title>
</head>
<body>
<p align=center>Prova di connessione al server MYSQL</p>
<ASPataList id="MyDataList" runat="server" RepeatColumns="2" RepeatDirection="Vertical">
<ItemTemplate>
Aerei <%# Container.DataItem ("nomeCampo")%>
Aerei <%# Container.DataItem ("nomeCampo")%>
</ItemTemplate>
</aspataList>
</body>
</html>
ed il messaggio di errore che ricevo è questo:
Server Error in '/asp.net' Application.
--------------------------------------------------------------------------------
File or assembly name System, or one of its dependencies, was not found.
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.IO.FileNotFoundException: File or assembly name System, or one of its dependencies, was not found.
Source Error:
The source code which generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, and then re-request the URL:
1) Add a "Debug=true" directive at the top of the file which generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System' could not be loaded.
LOG: Post policy reference: System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Attempting download of new URL file:///C:/Programmi/ASP.NET/Premium/V1.0Beta2/Temporary%20ASP.NET%20Files/asp.net/93f6b5ef/e445284d/System.DLL.
LOG: Attempting download of new URL file:///C:/Programmi/ASP.NET/Premium/V1.0Beta2/Temporary%20ASP.NET%20Files/asp.net/93f6b5ef/e445284d/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Programmi/EasyPHP/asp.net/bin/System.DLL.
LOG: Attempting download of new URL file:///C:/Programmi/EasyPHP/asp.net/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Programmi/ASP.NET/Premium/V1.0Beta2/Temporary%20ASP.NET%20Files/asp.net/93f6b5ef/e445284d/System.EXE.
LOG: Attempting download of new URL file:///C:/Programmi/ASP.NET/Premium/V1.0Beta2/Temporary%20ASP.NET%20Files/asp.net/93f6b5ef/e445284d/System/System.EXE.
LOG: Attempting download of new URL file:///C:/Programmi/EasyPHP/asp.net/bin/System.EXE.
LOG: Attempting download of new URL file:///C:/Programmi/EasyPHP/asp.net/bin/System/System.EXE.
Stack Trace:
[FileNotFoundException: File or assembly name System, or one of its dependencies, was not found.]
ASP.connessioneMysql_aspx.Page_Load(Object obj, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +73
System.Web.UI.Page.ProcessRequestMain() +394
--------------------------------------------------------------------------------
Version Information: Runtime Build:1.0.2914.16; ASP.NET Build:1.4000.2914.16
che cosa vuol dire dove sbaglio?