I created a my own util.dll using following procedures.
I ran ODBC Installation setup on my machine and add the refference as "c:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.Data.Ddbc.dll" to the project. Then I inserted following line in my class.Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports Microsoft.Data.ODBC
All working fine when i used util.dll in other projects. But this is not working after I hosted on this website instead I am getting following error msgs.
---------------------------------***-----------------------
File or assembly name Microsoft.Data.Odbc, 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 Microsoft.Data.Odbc, or one of its dependencies, was not found.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Data.Odbc' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Data.Odbc, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///E:/web/scaffusacom/htdocs/Mel
LOG: Initial PrivatePath = bin
Calling assembly : Util, Version=1.0.267.42295, Culture=neutral, PublicKeyToken=null.
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.Data.Odbc, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.
Stack Trace:
[FileNotFoundException: File or assembly name Microsoft.Data.Odbc, or one of its dependencies, was not found.]
Util.DbaseC.Open() +0
Util.DbaseC.ExecuteReader(String Sql, IDataReader& RetReader, vCommandBehavior Behavior) +40
Mel.clsCach.PrepareMainURLSFromDB() +103
Mel.clsCach.getMainURLS() +40
Mel.ctrlLinks.Show() +79
Mel.ctrlLinks.Page_Load(Object sender, EventArgs e) +58
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +731
------------**-------------------------**----
It is trying to locate the dll path which is not there in hosting place. Do i need to upload Microsoft.Data.Ddbc.dll to BIN folder?
why is that ?
This hosting website should provide this dll ?
Pls help me to understand..
Thanks
I think you are referencing a older name space.
My guess is that you are using Framework 1.0 with ODBC .NET provider installed seperately. The ODBC seperate install for framework 1.0 uses a Microsoft.Data.Odbc. ODBC .Net comes bundled with Framework 1.1, and microsoft decided to change its name space to System.Data.Odbc
See
http://kb.discountasp.net/article.aspx?id=10068
I suggest you update your computer to framework 1.1 and change your code to reference System.Data.Odbc
quote:
Originally posted by shashi
I created a my own util.dll using following procedures.
I ran ODBC Installation setup on my machine and add the refference as "c:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.Data.Ddbc.dll" to the project. Then I inserted following line in my class.Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports Microsoft.Data.ODBC
All working fine when i used util.dll in other projects. But this is not working after I hosted on this website instead I am getting following error msgs.
---------------------------------***-----------------------
File or assembly name Microsoft.Data.Odbc, 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 Microsoft.Data.Odbc, or one of its dependencies, was not found.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Data.Odbc' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Data.Odbc, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///E:/web/scaffusacom/htdocs/Mel
LOG: Initial PrivatePath = bin
Calling assembly : Util, Version=1.0.267.42295, Culture=neutral, PublicKeyToken=null.
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.Data.Odbc, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/mel/7d4e5462/feff32fc/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc.EXE.
LOG: Attempting download of new URL file:///E:/web/scaffusacom/htdocs/Mel/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.
Stack Trace:
[FileNotFoundException: File or assembly name Microsoft.Data.Odbc, or one of its dependencies, was not found.]
Util.DbaseC.Open() +0
Util.DbaseC.ExecuteReader(String Sql, IDataReader& RetReader, vCommandBehavior Behavior) +40
Mel.clsCach.PrepareMainURLSFromDB() +103
Mel.clsCach.getMainURLS() +40
Mel.ctrlLinks.Show() +79
Mel.ctrlLinks.Page_Load(Object sender, EventArgs e) +58
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +731
------------**-------------------------**----
It is trying to locate the dll path which is not there in hosting place. Do i need to upload Microsoft.Data.Ddbc.dll to BIN folder?
why is that ?
This hosting website should provide this dll ?
Pls help me to understand..
Thanks