Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Arunima_Paul
New Member

PowerBI-The type initializer for 'System.Net.ServicePointManager' threw an exception.

Since February 23, 2025, Power BI fails to open and throws the following error:

The type initializer for 'System.Net.ServicePointManager' threw an exception.

 

Learning PowerBI since 2023 but tried to connect MySQL database for the first time.

 

This issue started on 23.02.25 after attempting to connect MySQL server for the first time in PowerBI to import data.

Initially MySQL server was not able to connect , showed error as :

Unable to connect. An error happened while reading data from the provider: Internal connection fatal error. Error state : 18.

Tried to connect using PowerBI ribbon, Get Data> All> My SQL Database.

Then the window popped up with the message: 'This connector requires one or more additional components to be installed before it can be used'.

 

Then the troubleshooter (the website which provided the dataset for data analysis) advised to run this code in Powershell:

[System.Data .Common.DbProviderFactories]:: GetFactoryClasses() | ogv

After running it showed the message in red in Powershell:

 

Exception calling "GetFactoryClasses" with 0 argument: An error occurred when creating the configuration section handler for system.data. Column "Invarientname" is constrained to be unique.Value 'MySQL.Data.MySQLClient' is already present.

At line 1 char 1

category info : not specified, MethodInvocationException

Fullqualified errorID :ConfiguartionErrorException.

 

If the above message was shown I was advised to run the following code in Powershell by the troubleshooter, and I ran the code in PowerShell.

 

[ # Paths for machine.config and backup (64-bit system with correct path)
$machineConfigPath = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
$backupConfigPath = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config.bak"

# Backup the original machine.config file
Copy-Item -Path $machineConfigPath -Destination $backupConfigPath

# Read the contents of the machine.config file
$config = Get-Content -Path $machineConfigPath

# Remove all lines that mention MySQL Data Providers
$config = $config -notmatch "
MySql.Data .MySqlClient"

# Write the updated content back to machine.config
Set-Content -Path $machineConfigPath -Value $config

# Output success message
Write-Host "Old MySQL connectors have been removed from machine.config." ]

 

Then the troubleshooter advised to download MySQL  version 8.0.28. and during installation, select the "Typical" option or "Repair" option.

 

I downloaded version 9.1.0 and selected Typical option because Repair option was not there. Then I found that PowerBI was not opening and throwing error as :The type initializer for 'System.Net.ServicePointManager' threw an exception. so I was advised to download .NET latest version.

In that time Powershell was not opening either.

 

Since then PowerBI is not opening in my laptop.

 

I asked ChatGPT about solution, it suggested several steps.

 

System Details:

  • Operating System: Windows 11 Home

  • .NET Framework Version: 4.8

  • MySQL Version : 8.0.31

Steps Taken to Resolve the Issue (But Did Not Work)

1. Uninstalled & Reinstalled Power BI (multiple times) from Microsoft website and Microsoft store.
2. Deleted Power BI cache and user settings.
3. Checked Windows Event Viewer – Shows: MMC could not create the snap-in. The snap-in might not have been installed correctly.

4. Uninstalled and Reinstalled .NET Framework 4.8
5. Ran SFC & DISM scans (sfc /scannow and DISM /restorehealth)
6. Tried re-registering MMC components (regsvr32 mmcndmgr.dll, etc.)
7. Installed PowerShell 7.5.0 – But [Net.ServicePointManager]::SecurityProtocol shows no output in PowerShell.

 

MySQL is working fine. Now what to do?

6 REPLIES 6
v-csrikanth
Community Support
Community Support

Hi @Arunima_Paul 
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!


Best Regards,
Community Support Team _ C Srikanth.

v-csrikanth
Community Support
Community Support

Hi @Arunima_Paul 

We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you.

If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.

v-csrikanth
Community Support
Community Support

Hi @Arunima_Paul 
Sorry for the late response. 

Thank you for being part of the Microsoft Fabric Community.

As highlighted by @lbendlin , the proposed approach appears to effectively address your requirements. Could you please confirm if your issue has been resolved?
If you are still facing any challenges, kindly provide further details, and we will be happy to assist you.

If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.


Arunima_Paul
New Member

In my laptop MYSQL .NET Conector 9.1.0 was installed. I uninstalled it, downloaded version 8.0.28 and tried to install (used TYPICAL). But the installation shows error- MYSQL Connector setup wizard ended prematurely because of an error.

And PowerBI still doesnot open.

Try installing as administrator.

lbendlin
Super User
Super User

Install the MySQL .Net driver 8.0.28. Other versions are not guaranteed to work.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.