Skip to content

add kern.nisdomainname to support dotnet#6

Merged
chris-smith-zocdoc merged 1 commit into
mainfrom
cs_dotnet_support
Feb 16, 2026
Merged

add kern.nisdomainname to support dotnet#6
chris-smith-zocdoc merged 1 commit into
mainfrom
cs_dotnet_support

Conversation

@chris-smith-zocdoc

Copy link
Copy Markdown

Upstream: anthropic-experimental#115

Fixes CookieContainer initialization on .net 8. In 10 they refactored this so its doesn't statically initialize this

Error: TypeInitializationException: The type initializer for 'System.Net.CookieContainer' threw an exception.
  Inner: InvalidOperationException: GetDomainName: -1
System.TypeInitializationException: The type initializer for 'System.Net.CookieContainer' threw an exception.
 ---> System.InvalidOperationException: GetDomainName: -1
   at Interop.Sys.GetDomainName()
   at System.Net.CookieContainer.CreateFqdnMyDomain()
   at System.Net.CookieContainer..cctor()
   --- End of inner exception stack trace ---
   at System.Net.CookieContainer..ctor()
   at System.Net.Http.HttpConnectionSettings.CloneAndNormalize()
   at System.Net.Http.SocketsHttpHandler.SetupHandlerChain()
   at System.Net.Http.SocketsHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Program.Main() in /Users/chris.smith/src/sandbox-runtime/scripts/dotnet-sandbox-test/Program.cs:line 10

@eugene-yao-zocdoc eugene-yao-zocdoc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@chris-smith-zocdoc chris-smith-zocdoc merged commit b6ef6cf into main Feb 16, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants