Skip to content

Commit 44a23ac

Browse files
authored
Fix WebViewAppContainerName caring about case (#19)
1 parent 4437ce9 commit 44a23ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SharpWebview/Loopback.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace SharpWebview
1010
/// </summary>
1111
public class Loopback
1212
{
13-
private const string WebViewAppContainerName = "Microsoft.Win32WebViewHost_cw5n1h2txyewy";
13+
private const string WebViewAppContainerName = "microsoft.win32webviewhost_cw5n1h2txyewy";
1414

1515
/// <summary>
1616
/// This method checks, if the loopback exception is present for the webview on windows.
@@ -29,7 +29,7 @@ public bool IsWebViewLoopbackEnabled()
2929
private string GetWebViewAppContainerSid()
3030
{
3131
var webviewAppContainer = GetAllAppContainers()
32-
.SingleOrDefault(a => a.appContainerName == WebViewAppContainerName);
32+
.SingleOrDefault(a => a.appContainerName.ToLower() == WebViewAppContainerName);
3333
ConvertSidToStringSid(webviewAppContainer.appContainerSid, out var webViewSid);
3434
return webViewSid;
3535
}
@@ -87,8 +87,8 @@ private List<SidAndAttributes> GetAllAppContainerConfigs()
8787
#region DllImports
8888
internal enum NETISO_FLAG
8989
{
90-
NETISO_FLAG_FORCE_COMPUTE_BINARIES = 0x1,
91-
NETISO_FLAG_MAX = 0x2
90+
NETISO_FLAG_FORCE_COMPUTE_BINARIES = 0x1,
91+
NETISO_FLAG_MAX = 0x2
9292
}
9393

9494
[StructLayout(LayoutKind.Sequential)]

0 commit comments

Comments
 (0)