Web Player bug? (.NET/Mono)

  1. I apologize if this is the wrong place to post this.

  2. My problem: In my C# script I call Dns.GetHostEntry(“my.hostname.com”) but it throws a SocketException “No such host is known”. I’ve tried the literal IP address “123.456.789.012” as well as the full hostname “http://my.hostname.com/” and still the same exception. Furtheremore, this only occurs in the webplayer, not the standalone or the editor build.

  3. I found the following post on the forums: http://forum.unity3d.com/viewtopic.php?p=68778&sid=c864a65ee18102550da6889a6f8f3e24

… but that didn’t help.

I’d love a response from someone in UT, since this seems like a webplayer-specific issue. Or if anyone has solved this somehow, please help! Thanks!

Use IPAddress.Parse(“123.456.789.012”) to create your own IPEndPoint. I got this to work in the webplayer. It doesn’t solve the webplayer problem of not being able to resolve host names but at least I can move forward.

Just had the same issue in the SFS API and nothing to do but use that workaround.

Yes. It’s a OS X specific bug in Mono version that we use. We’ll fix in some future version. For now, try getting IP addresses via some other means.

Thank you for the replies!

My work-around will get me by for now. Any chance you can post the version of Mono that is built into Unity right now? This would greatly help me track down bugs related to .NET and mono as well as functionality pieces that may or may not be included. Thanks!

Dont know the exact version.

But there is also a bug in double.Parse that doesnt understand that Windows and OSX treat , and . differently as part of the number. Fixed in later updates, and workaround is to force some globalization settings to e.g. US format