Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsFirewallHelper.dll #68

Open
GitUser200607 opened this issue Dec 24, 2024 · 0 comments

Comments

@GitUser200607
Copy link

GitUser200607 commented Dec 24, 2024

I have some code:

		foreach (FirewallWASRuleWin8 rule in FirewallManager.Instance.Rules)
		{
			// Delete old rule by rule Name (we don't have GUID in FW rule)
			if (rule.Grouping == $"_{App.ApplicationName}")
			{
				if (rule is not null)
				{
					FirewallManager.Instance.Rules.Remove(rule);
				}
			}
		}

The result of code working is good, but when I run Visual Studio Community 2022, I see the errors in Debug:

Exception thrown: 'System.Runtime.InteropServices.COMException' in WindowsFirewallHelper.dll
Exception thrown: 'System.NotSupportedException' in WindowsFirewallHelper.dll

I've thought it was the problem with the deleting FW rule, but the errors are shown even before condition. Should I ignore them?

Windows 10 Pro x64 (19045.5247)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant