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

Not able to use a host name to connect to web socket #85

Open
jphoc13 opened this issue Mar 13, 2017 · 3 comments
Open

Not able to use a host name to connect to web socket #85

jphoc13 opened this issue Mar 13, 2017 · 3 comments

Comments

@jphoc13
Copy link

jphoc13 commented Mar 13, 2017

Cannot access disposed object is the error I am receiving. For some reason the socket doesn't open and so it gets garbage collected.

I am able to use the host machine IPaddress but in trying to use the hostname I am running into issues.

sIpAddress = "host.hostname.com";
                        sPort = Convert.ToInt32("11003");
                        IPHostEntry ip = Dns.GetHostEntry(sIpAddress);
                         vWebsocket= new WebSocket("ws://" + ip.HostName + ":" + sPort + "/");

Note: I am trying to use the web socket in an iOS app on Xamarin Studio. I am able to connect from the same machine I am debugging this app on. Not sure if this matters.

@kerryjiang
Copy link
Owner

Do you have stacktrace of this exception.

@zplzk2
Copy link

zplzk2 commented Jul 3, 2017

I met similar issue with mono 4.6.2.7. My server is behide ELB and that seems to matter. In this case, only IP can work.
Both IP and host name work when connecting to a server without ELB.

Downgrading to mono 4.4.2.11 can fix it (working with host name and ELB).

@jphoc13
Copy link
Author

jphoc13 commented Jul 3, 2017

I was able to connect with a hostname for iOS, but still not able to do so in Android.

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

3 participants