locked
Trouble with connecting a simple Blazor Server app to a local MySQL database RRS feed

  • Question

  • I have a very simple Blazor Server application running successfully on a PC. Everything works as expected except I can't connect to the MySQL database on the same server. I've tried "localhost" and the IP address of the PC to connect but it fails. I'm using some C# code that I use in my WPF applications that connects to the same database perfectly.

    I'm just not sure what I'm missing to make the connection work. Any ideas? Thanks!
    Wednesday, September 2, 2020 6:41 PM

All replies

  • It would be wonderful to have the exact error message. Also consider using Fiddler to monitor what's going on while attempting to connection or use SSMS Activity Monitor which may assist.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, September 2, 2020 7:48 PM
  • When it tries to connect I get: Exception thrown: 'System.TypeInitializationException' in MySql.Data.dll

    I've installed Fiddler and ran it but I don't see anything about MySQL in there unless I'm missing it.

    Everything else with the Blazor program works great, I just can't get it to connect.

    Wednesday, September 2, 2020 8:52 PM
  • Hi T Gregory,

    Thank you for posting here.

    There is a forum dedicated to discussing Blazor issues in the Asp.net forum.

    You can post your questions there.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 3, 2020 2:38 AM