Can not open socket connection

Hi,
This code doesn't work on my phone but it works on emulator. What should the reason be? What should I do?
SocketConnection sc =
(SocketConnection)Connector.open("socket://MY_SERVER_IP:1111");

Hi,
The problem might be becoz of the NAT (Network Address Tranlation). Coz if your server is behind some NAT then, your mobile ll get an ip that all other mobile conneted to that server througth that specific service provider.
In short, using socketConnection to connect a server, if the server is behind a NAT then all the mobile client connecting to that server ll get same ip, so server dont know to which ip it shold send the response.
tell me if it helps

Similar Messages

  • HT4157 My iPad. Oonnects to other wifi it used to connect to my work wifi but it will. Not connect now what is work I am connected with my iPhone but iPad will. Not connect or it says safari can not open page

    I can connect my iPhone to my work wifi but when I try to connect my IPad it will not connect. It says safari can not open page.  What's up with that I have used IPad connected to work wifi before

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • I cannot open my Yahoo Mail but everything else is OK.  When I click Yahoo Mail Icon, I get this error message "Safari Cannot open this page.  Safari can not establish secure connection with Yahoo Mail.

    I cannot open my Yahoo Mail but everything else is OK.  When I click Yahoo Mail Icon, I get this error message "Safari Cannot open this page.  Safari can not establish secure connection with Yahoo Mail.

    It sounds as though a script on the site, or an advertisement, is not working quite right...
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    (You also can clear Firefox's cache completely using:
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now")
    (2) Remove the site's cookies using either of these. Save any pending work first.
    While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?

  • Sql connection can not open why?

    I use the following source code to connect sql database, but the connection can not open, can somebody help me? thanks.
    SqlCeConnection con = new SqlCeConnection("Data Source="
                    + System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "Sampledatabase.mdf"));
                con.Open();
    OR
    SqlCeConnection con = new SqlCeConnection(@"Data Source=|DataDirectory|\Sampledatabase.mdf");
    con.Open();

    Hi Sunny,
    Based on your code, your case related to how to connect to an MDF database file?
    The keypoint is how to write the connectionstring.
    Here is a sample,
    con.ConnectionString = @"Data Source=.\SQLEXPRESS;
    AttachDbFilename=c:\folder\SampleDatabase.mdf;
    Integrated Security=True;
    Connect Timeout=30;
    User Instance=True";
    From your second code with DataDirectory
    Note the filepath should have |DataDirectory| which actually links to "current project directory\App_Data\" or "current project directory" and get the .mdf file.
    Best reagrds,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can not open messages.  Says I am not connected.  But I am

    Can not open messages.  It says that I am not connected.  I can get emails and open Facebook.  I know that I am connected.  It accepts my password.

    Check Settings>General>Date & Time>Set Automatically>On. Make sure that the time zone setting is also set correctly.
    If that didn't solve the problem, restart your iPad and try again. If that fails, reset your iPad and try again.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Hi, I can not open iTunes unless my computer is connected to my work network. I have tried to uninstall and install and nothing. I have tried to upgrade quick time, no luck.

    Hi, I can not open iTunes unless my computer is connected to my work network. I have tried to uninstall and install and nothing. I have tried to upgrade quick time, no luck.

    HI, there is no error message when I try to open iTunes, it just hangs.
    In regards to the location of the media folder it was located on the network however I changed it to a local directory. Should I try unistall and install with the correct media library?

  • I am connected to the Internet (Wifi) but can not open any website

    I have not used my Mac Book Air for a while.
    Now I am connected to the Internet but can not open any website.
    Just nothing happens
    Anybody had this issue?

    Is there any message shown on the screen?
    Power down the router. Unplug it from the wall. Wait 10 minutes.
    Plug it back in. Power it on. Wait until all the lights are lit up properly.
    Restart the computer.

  • TS1702 Hello, we have a Mac and an ipad,the Mac is working and wifi is on and the Ipad's wifi is on too, but Ipad Safari can not open because it could not connect to the server, does any one know what have happened?

    Hello, we have a Mac and an ipad, the Mac is working and wifi is on and the ipad's wifi is on too, but Ipad Safari can not open the page because it could not connect to the server, does any one know that?

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are drooping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    6. Potential Quick Fixes When Your iPad Won’t Connect to Your Wifi Network
    http://ipadinsight.com/ipad-tips-tricks/potential-quick-fixes-when-your-ipad-won t-connect-to-your-wifi-network/
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Fix WiFi Issue for iOS 7
    http://ipadnerds.com/fix-wifi-issue-ios-7/
    iOS 6 Wifi Problems/Fixes
    Wi-Fi Fix for iOS 6
    https://discussions.apple.com/thread/4823738?tstart=240
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    iPad: Issues connecting to Wi-Fi networks
    http://support.apple.com/kb/ts3304
    How to Boost Your Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Boost-Your-Wi-Fi-Signal.h tm
    Troubleshooting a Weak Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/Troubleshooting-A-Weak-Wi-Fi-Sig nal.htm
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    10 Ways to Boost Your Wireless Signal
    http://www.pcmag.com/article2/0,2817,2372811,00.asp
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    Some Wi-Fi losses may stem from a problematic interaction between Wi-Fi and cellular data connections. Numerous users have found that turning off Cellular Data in Settings gets their Wi-Fi working again.
    You may have many apps open which can possibly cause the slowdown and possibly the loss of wifi. In iOS 4-6 double tap your Home button & at the bottom of the screen you will see the icons of all open apps. Close those you are not using by pressing on an icon until all icons wiggle - then tap the minus sign. For iOS 7 users, there’s an easy way to see which apps are open in order to close them. By double-tapping the home button on your iPhone or iPad, the new multitasking feature in iOS 7 shows full page previews of all your open apps. Simply scroll horizontally to see all your apps, and close the apps with a simple flick towards the top of the screen.
    Wi-Fi or Bluetooth settings grayed out or dim
    http://support.apple.com/kb/TS1559
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • HT1222 i can not open my i pad-1  and the device gave me message connect to iTunes and when connect the computer give me message type the password firstly i do not know what can i do ?

    i can not open my i pad-1  and the device gave me message connect to iTunes and when connect the computer give me message type the password firstly i do not know what can i do ?

    Is it disabled due to too many incorrect passcode attempts ? If it is then you may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808 - you should then be able to reset the iPad and restore/resync your content to it.

  • Can not open my msn mail since I updated Firefox, get connection timed out error

    Since we updated our Firefox to the last version I have not been able to open my email at msn/live.com We have 3 computers networked and it will not open on any of them. However, my husbands account [email protected] opens. I can open it on my home computer but not at our office and it is our office email. Can you help? I've cleared the cache through the tools/options/etc. It will not open on IE either.
    Thanks. Since I can not open this email account I have a yahoo account at [email protected]

    You can check:
    * [[Removing the Search Helper Extension and Bing Bar]]
    You can open the <b>about:config</b> page via the location bar and do a search for <i>bing</i> via the Filter at the top of that page.<br />
    You can reset all <i></i> related prefs via the right-click context menu to their default values.

  • Keep opened socket connection?

    Hi,
    My Java application communicates with server on average every 3 seconds. I wonder if it is a good idea to keep an opened socket connection to the server and don't open new connection for each request. The problem with this is that if in the meantime is connection aborted, java.net.SocketException is throwned.
    What do you think about keeping opened connection? Is appropriate to work with opened connections or to open new connection for each new request? How do you solve in your applications situation when communication is irregular but frequent.
    Thanks.

    I had one more question on this topic relating to capture and processing exceptions. Communication between client and server I accomplish wit these three classes:
    - ClientRequest - represents client request to the server
    - Communication - gets ClientRequest and socket connection to the server and sends the request to the server
    - ServerResponse - represents response returned from the server
    Now If Communication class gets dead connection it can't work and throws an exception. We discussed that I should find out the situation and suitably respond to this situation.
    My question is whether the method for reconnection should call:
    a) Communication class
    b) class that uses the Communication class?
    c) somebody else (?)
    In case a) there is an advantage that all is in one place and Communication class user does not have to worry about anything beause class will try reconnect itself (if second attempt fails, method throws another exception). The advantage of b) is that the user needs, he can respond to this situation and do some another action.
    Thanks.

  • Can not open any open any web pages. Receive the following error message (Error code: sec_error_library_failure)

    I can not open any websites using Mozilla browser. I have attached a screen shot of the error message that I receive. You will also find it below: .
    Secure Connection Failed
    An error occurred during a connection to www.google.com. security library failure. (Error code: sec_error_library_failure)
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.
    This error appears on all pages that I try to browse to. All other browsers work fine on my computer.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Can not open a particular web site

    Hi, I always tried to open one web site and it used to open well in Firefox and IE. but since last few days it stopped opening both in FF and IE. It gives error as
    1. The connection has timed out The server at www.eng-tips.com is taking too long to respond.
    2.If you are unable to load any pages, check your computer's network
    connection.
    3.If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    I Google with all above questions and tried most of the solutions, nothing works. Wondering why it stooped opening suddenly ? I tried to open it from other locations just to check if its down but its fine and working but can not open from my home internet. Any suggestions? Thanks in advance.

    Did you [https://support.mozilla.org/en-US/kb/Error%20loading%20web%20sites#w_try-clearing-firefoxs-cookies-and-cache Try clearing Firefox's cookies and cache] ?
    if this is not helpful see : [https://support.mozilla.org/en-US/kb/Error%20loading%20web%20sites Error loading web sites]
    http://kb.mozillazine.org/Error_loading_any_website
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Can not open my web page?

    Installed my new 2T unit 5 days ago, it was fine till this afternoon. I can not open web page or connect to internet. (wired or wirelessly)
    No issue with my cable modem as i tested by pluging wire direct from the modem.
    "Green" light in front is OK, i have to unplug power and plug power back in after 10 sec to restore the unit to function again.
    I read about the new time capsule will loss connections over time, wonder if anyone has experienced this problem in the past?

    Hi BigChinaD,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    Resetting an AirPort Base Station or AirPort Time Capsule FAQ
    http://support.apple.com/kb/HT3728
    Cheers,
    - Judy

  • Can not open Web from Nokia N81

    Hi
    My Nokia N81 worked fine until today
    I just connected it to PC Suite and made a synchronization - now I have folowing problem - I can not open web-browser any more.
    When I go into menu and then try to open Icon web - screens becames blue (desctopimage) for a second and then I'm landing again in menu just as it was before click on icon
    What can be the reason of this problem?
    Similar happened also with N-Gage Icon. I've tried it with memory card and without it - the result is the same - I can not go into web-section of my Nokia

    Hi,
    It seems that some faults has occurred during
    the synchronization. You should re-set your
    internet settings. If the issue persists your
    phone will need reformat.
    Regards.
    Fattan

Maybe you are looking for

  • Relative href problems

    Up to recently I've been working with XSLT 1.0 stylesheets and using relative hrefs without trouble. Now with the XSLT 2.0 stylesheets I get an error that the protocol is missing. If I change my hrefs to "file://myxsl.xsl" there is an error message,

  • Formatting issues in iBooks on the iPad

    Hello, I'm creating iBooks to publish on the iBookstore, but am having some formatting issues, or so I think at least. I have already created one iBook (http://itunes.apple.com/gb/book/id387336687, apologies for the morbid subject matter), which I te

  • TS1424 is it just me that can't get into the store

    is it just me that can not get into the store

  • No TV Tuner in dv4-1241tx

    I feel cheated & fooled to find the integrated TV tuner missing from the Laptop.. Enquired many times with HP but no response.. Worst is nothing found in search for the compatible tuner on the HP site & even no response on from where to buy.. Worst e

  • I suscribe to create pdf (convert images to pdf) but the iphone app doesnt work

    I paid the suscription to use the tool, it shows a message that it saids that i currently suscribed for the next month, but i can't use it!  And still appear the option to buy it!!