Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Help! My .NET to MySQL application suddenly stopped working...

Help! My .NET to MySQL application suddenly stopped working...

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpdelphidatabasemysqlvisual-studio
5 Posts 4 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    erikbrannlund
    wrote on last edited by
    #1

    First some background. 10+ years ago my spouse started a small webshop and I made the administration part in Delphi. Slowly transitioning it to the web. I have tried to make everything as automatic as I can. Like register a payment automatically makes a record in the ledger. On the same line I later made a C# .NET as a part in the handling of incoming invoices. She scans the invoice to PDF and place it on the desktop or drops it there if it is delivered electronically. My application detects the file and pops up and she can fill in the things needed to put in the ledger and store it in the database. Now last week the application starts and then closes without being touched for years. It worked last month, the delphi written things still works. Does anyone have any idea why, this coincide with me reading something about Microsoft removing some old version of TLS. The application uses Entityframework. Then I tried opening up the source in VS 2017 community edition(?) where it was written but I never get past the "credentials is wrong" page. Moved the code to another computer with VS 2022 on it where I had trouble getting it to work. When I did I got back an exception telling me "opening of table didn't work" but no indication of why.

    D 1 Reply Last reply
    0
    • E erikbrannlund

      First some background. 10+ years ago my spouse started a small webshop and I made the administration part in Delphi. Slowly transitioning it to the web. I have tried to make everything as automatic as I can. Like register a payment automatically makes a record in the ledger. On the same line I later made a C# .NET as a part in the handling of incoming invoices. She scans the invoice to PDF and place it on the desktop or drops it there if it is delivered electronically. My application detects the file and pops up and she can fill in the things needed to put in the ledger and store it in the database. Now last week the application starts and then closes without being touched for years. It worked last month, the delphi written things still works. Does anyone have any idea why, this coincide with me reading something about Microsoft removing some old version of TLS. The application uses Entityframework. Then I tried opening up the source in VS 2017 community edition(?) where it was written but I never get past the "credentials is wrong" page. Moved the code to another computer with VS 2022 on it where I had trouble getting it to work. When I did I got back an exception telling me "opening of table didn't work" but no indication of why.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You've said a lot but nothing that can be used to give any suggestions. We know nothing about the code, what it uses or does, nor the EXACT exception messages.

      Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
      Dave Kreskowiak

      E 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You've said a lot but nothing that can be used to give any suggestions. We know nothing about the code, what it uses or does, nor the EXACT exception messages.

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
        Dave Kreskowiak

        E Offline
        E Offline
        erikbrannlund
        wrote on last edited by
        #3

        I don't use C# on a daily basis and I haven't touched the code for a long time. There could be that this debug session broke when imported in 2022 instead of 2017 where the original development was done. I hoped that someone would say something along the lines of (Microsoft disabled Tech Z version X, try installing Y). But anyway Entity framework and under references MySql.Data and MySql.Data.Entity.EF6. NuGet packages MySql.Data 6.9.9 and MySql.Data.Entity 6.9.9 (This one is marked as depreceted). This is the exception I received: System.Data.Entity.Core.EntityException HResult=0x80131501 Message=The underlying provider failed on Open. Source=EntityFramework StackTrace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() at BusinessLayer.Supplier.GetAll() in C:\mitt\marieshopnet\BusinessLayer\Supplier.cs:line 33 at PendingLedgerEvidence.Form1..ctor() in C:\mitt\marieshopnet\PendingLedgerEvidence\Form1.cs:line 60 at PendingLedgerEvidence.Program.Main() in C:\mitt\marieshopnet\PendingLedgerEvidence\Program.cs:line 19 This exception was originally thrown at this call stack: [External Code] Inner Exception 1: MySqlException: Unable to connect to any of the specified MySQL hosts.

        L J 2 Replies Last reply
        0
        • E erikbrannlund

          I don't use C# on a daily basis and I haven't touched the code for a long time. There could be that this debug session broke when imported in 2022 instead of 2017 where the original development was done. I hoped that someone would say something along the lines of (Microsoft disabled Tech Z version X, try installing Y). But anyway Entity framework and under references MySql.Data and MySql.Data.Entity.EF6. NuGet packages MySql.Data 6.9.9 and MySql.Data.Entity 6.9.9 (This one is marked as depreceted). This is the exception I received: System.Data.Entity.Core.EntityException HResult=0x80131501 Message=The underlying provider failed on Open. Source=EntityFramework StackTrace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() at BusinessLayer.Supplier.GetAll() in C:\mitt\marieshopnet\BusinessLayer\Supplier.cs:line 33 at PendingLedgerEvidence.Form1..ctor() in C:\mitt\marieshopnet\PendingLedgerEvidence\Form1.cs:line 60 at PendingLedgerEvidence.Program.Main() in C:\mitt\marieshopnet\PendingLedgerEvidence\Program.cs:line 19 This exception was originally thrown at this call stack: [External Code] Inner Exception 1: MySqlException: Unable to connect to any of the specified MySQL hosts.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The "provider" exception (probably) refers to the MySQL database driver / adapter. If you haven't touched stuff "in years", you need to verify all the versions (of components) you need are in "sync".

          "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

          1 Reply Last reply
          0
          • E erikbrannlund

            I don't use C# on a daily basis and I haven't touched the code for a long time. There could be that this debug session broke when imported in 2022 instead of 2017 where the original development was done. I hoped that someone would say something along the lines of (Microsoft disabled Tech Z version X, try installing Y). But anyway Entity framework and under references MySql.Data and MySql.Data.Entity.EF6. NuGet packages MySql.Data 6.9.9 and MySql.Data.Entity 6.9.9 (This one is marked as depreceted). This is the exception I received: System.Data.Entity.Core.EntityException HResult=0x80131501 Message=The underlying provider failed on Open. Source=EntityFramework StackTrace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0() at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() at BusinessLayer.Supplier.GetAll() in C:\mitt\marieshopnet\BusinessLayer\Supplier.cs:line 33 at PendingLedgerEvidence.Form1..ctor() in C:\mitt\marieshopnet\PendingLedgerEvidence\Form1.cs:line 60 at PendingLedgerEvidence.Program.Main() in C:\mitt\marieshopnet\PendingLedgerEvidence\Program.cs:line 19 This exception was originally thrown at this call stack: [External Code] Inner Exception 1: MySqlException: Unable to connect to any of the specified MySQL hosts.

            J Offline
            J Offline
            jkirkerx
            wrote on last edited by
            #5

            Your app's connector could not connect to the database host, or it connected and failed authentication. TLS is a transport protocol, a newer version of handshaking or validating in more detail. TLS last I checked is at V1.3, and V1.0, V1.1 was discontinued, but that was years ago. If your database is hosted at home or in your shop, then that's a local connection, and could be a firewall blocking a port number for MySQL. If your using a cloud host, then perhaps they upgraded. But if you wrote the app personally, you should remember how that part works, and be able to fix it fairly quickly. EF has nothing to do with the connection to the database server. You can use Fiddler to watch the connection, or check error logs, there is something out there that will guide you.

            If it ain't broke don't fix it Discover my world at jkirkerx.com

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups