Problem connecting MYSQL dB Using ASP.net (C#)

Discussion in 'Database Support' started by chandan, Jan 27, 2005.

  1. chandan

    chandan Guppy

    Hi,

    We have been unable to connect to MYSQL database for last couple of days. We use asp.net and C# as code behind.

    We use the connectionstring as "DRIVER={MySQL ODBC 3.51 Driver};SERVER=64.156.223.231;DATABASE=ABC;UID=Chandan;PASSWORD=chandanxyz;OPTION=3;"
    "
    NOTE: I have not given actual db name,userid, and password for security reason.

    IS THIS ANYTHING TO DO WITH OS AS WE DEVELOP ON Windows Env?


    Please see the error information copied below:

    We will be thankful for any valuable suggestion.

    Also you can see the error at http://www.bbcdating.com..

    We are not agree with the reason given by Stephen as it is nothing to do with references at all.




    Regards,
    Chandan

    ERROR
    ********************************************

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    ?
    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: ?

    Source Error:


    Line 35: private static System.Collections.ArrayList __fileDependencies;
    Line 36:
    Line 37: public index_aspx() {
    Line 38: System.Collections.ArrayList dependencies;
    Line 39: if ((ASP.index_aspx.__initialized == false)) {


    Source File: c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\5c8aaec9\43744815\kmwwpgu4.0.cs Line: 37

    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:///D:/hshome/osspl/bbcdating.com
    LOG: Initial PrivatePath = bin
    Calling assembly : dating, Version=1.0.1848.32878, Culture=neutral, PublicKeyToken=null.
    ===

    LOG: Publisher policy file is not found.
    LOG: No redirect found in host configuration file (C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
    LOG: Using machine configuration file from C:\WINNT\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:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/5c8aaec9/43744815/Microsoft.Data.Odbc.DLL.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/5c8aaec9/43744815/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
    LOG: Attempting download of new URL file:///D:/hshome/osspl/bbcdating.com/bin/Microsoft.Data.Odbc.DLL.
    LOG: Attempting download of new URL file:///D:/hshome/osspl/bbcdating.com/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.DLL.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/5c8aaec9/43744815/Microsoft.Data.Odbc.EXE.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/5c8aaec9/43744815/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.
    LOG: Attempting download of new URL file:///D:/hshome/osspl/bbcdating.com/bin/Microsoft.Data.Odbc.EXE.
    LOG: Attempting download of new URL file:///D:/hshome/osspl/bbcdating.com/bin/Microsoft.Data.Odbc/Microsoft.Data.Odbc.EXE.



    Stack Trace:


    [FileNotFoundException: ?]
    dating.Utility.dbutility..ctor() +0
    dating.index..ctor() in d:\dating\index.aspx.cs:27
    ASP.index_aspx..ctor() in c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\5c8aaec9\43744815\kmwwpgu4.0.cs:37

    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
    System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
    System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
    System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +164

    [HttpException (0x80004005): Failed to create page of type 'ASP.index_aspx'.]
    System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context) +341
    System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String virtualPath, String inputFile, HttpContext context) +43
    System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path) +44
    System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
    System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +96
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

    ******************************************
  2. Stephen

    Stephen US Operations Staff Member

    You don't agree that because there are references to d:\dating everywhere that it won't work?

    That error has more details and doesn't show it 5-6 times anymore, so progress is being made, but the errors are clearly showing it is looking for files in d:\dating which does not exist.
  3. chandan

    chandan Guppy

    Hi Stephen,

    Thanks for your response. We have already commited to the client to show demo by today at any cost. Could you tell us what exactly we need to do in this scenario assuming that it's error releated to path references.

    We will be greatful to you for early response.


    Please take it seriously as if we do not show demo then we will nowhere.

    Your help will be appreciated.


    Thanks & Regards,
    Chandan
  4. Yash

    Yash Administrator Staff Member

    i suggest you post this issue at vbforums.com

    Definately a coding issue

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services