My WPF application won't start on another PC, but the application without MySql does, what could be the problem?
P粉738046172
P粉738046172 2024-04-03 11:16:00
0
1
499

This is my first time using a database. I created an application using XAMPP via mySql localhost that contains tables from dbForge. I copied all the files and downloaded the latest 6.0 framework on another PC but it won't start and doesn't give any error message. Additionally, I can see in Task Manager that it opens for a few seconds and then closes.

Also, I tried it with a different application without mySql and the application started. What are some common mistakes I might make? I can provide more information if needed, but right now I don't know what to check.

Connect code blocks:

public class ApplicationDbContext : DbContext
{
    public DbSet<Berletes> Berletesek { get; set; }
   
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        var connetionString = "Server=localhost; Database=foxgymapp; Uid=root; Pwd=;";
        optionsBuilder.UseMySql(connetionString, ServerVersion.AutoDetect(connetionString));
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
    }
}

P粉738046172
P粉738046172

reply all(1)
P粉475126941

The problem you are encountering is that you are trying to access a database that does not exist.

You are pointing to a database in localhost hosted in your computer, you can run the same database on another computer or expose your database from your computer to another computer .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template