- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try installing as administrator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
09-23-2024 03:45 AM | |||
10-03-2016 01:19 PM | |||
10-09-2024 10:16 AM | |||
08-21-2023 01:10 AM | |||
01-06-2025 04:36 AM |
User | Count |
---|---|
117 | |
96 | |
83 | |
55 | |
46 |