connection lost problem,Please help me ASAP

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

Posts: 6
Joined: 05 Apr 2010, 06:49

connection lost problem,Please help me ASAP

Postby DeepikaMehta » 05 Apr 2011, 05:55

Hello ,

I am not able to find the root cause of the problem that why the connection from SFS lost Automatically, their is no such condition in which it losts ........I am working on a game and due to which my game get stuck.......Game is working fine on localhost but as we upload the game on server it goes out.Following are some details that i want to give

1.As backend we are using framework with visualstudio2008) with c#:
For this i am using sfs Pro 1.2.6 dotnet Api.

2. And for Iphone side we are using
Latest iPhone API 1.0.0 RC4

3. Note: our client server contains dotnet 4.0 frame work, due to which i have convert the code using framework 4.0(visual studio 2010), Api that i am using will be the same .

below is my web config that i am using

Code: Select all

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
      <add key="SFSServerIp" value="MyIP-Address"/>
      <add key="SFSServerPort" value="9339"/>
      <!--Mail Server Details-->
      <add key="MailAddrFrom" value=""/>
      <add key="SmtpClient" value=""/>
      <add key="NetworkCredential" value=""/>
      <add key="Password" value=""/>
      <!--End Mail Server Details-->
      <add key="AvtarImgHeight" value="85"/>
      <add key="AvtarImgWidth" value="60"/>
      <add key="AvtarLargImgHeight" value="50"/>
      <add key="AvtarLargImgWidth" value="50"/>
      <add key="ImgHeightBig" value="150"/>
      <add key="ImgWidthBig" value="185"/>
      <!--<add key="FilePath" value="E:\Deepika\TeinLen/Error1.txt"/>-->
      <add key="UploadImageURL" value="UploadedImages/"/>
      <!--Error Messages-->
      <add key="InvalidLogin" value="Invalid user name or password"/>
      <add key="StatusMsg" value="Not Successfully"/>
      <add name="ConnTienLen" connectionString="Data Source=;Initial Catalog=b24solu_killergame;User Id=b24solu_killergame;Password=KillerGame1;" providerName="System.Data.SqlClient"/>
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
      <compilation debug="true" targetFramework="4.0">
            <!--<add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
      <authentication mode="Windows"/>
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
            <add name="HttpPost"/>
            <add name="HttpGet"/>
      <sessionState mode="InProc" timeout="200">
      <customErrors mode="Off" defaultRedirect="Index.aspx"></customErrors>
      <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.

3. on server side we have denoted MaxSocketIdleTime =100000 and MaxUserIdleTime=100000

Please Help me with this problem :(


Deepika Mehta
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 05 Apr 2011, 07:28


I dont totally understand your setup here. And neither what the problem is.

You say you are using as the backend? And not SFS2X? With an iPhone client running obj-c sfs2x API?

And what kind of error messages do you get - and from what client? And what does the server log say (if you are even running SFS2X)?

Sorry - somewhat confused

Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter:
Posts: 6
Joined: 05 Apr 2010, 06:49

Postby DeepikaMehta » 05 Apr 2011, 10:26


Actually I developed an iPhone game in which controller code is written in Dot Net Framework 3.5 for which we use SFS Pro 1.2.6 (demo version) as a game server. I mean to say that one connection is creating from dot net side .

Here is the flow of game.

1. when user from iphone request to create room then a function from webservice(developed in dotnet) will be called to create a room .

2. This webservices create a room on SFS server and virtual user joined the game as game(room) controller. This controller controls the whole logic of game. If this controller gets out from the room then all user gets a message that "Game owner has closed the game" and room gets destroyed.

Now the problem is this

when I am running my code from my system(localhost) then everything is working fine) but when I upload it on server then I am getting "Game owner has closed the game" message b'cause dot net controller connection lost automatically.

Now one thing is that i have code the controller in framework 3.5 and the framework on server is 4.0........

I also try to run the game after converting my code on framework 4.0 but I am still getting same problem. Please try to get me out from this problem and let me know If you need any other information............

Deepika Mehta

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: cakoceag874 and 4 guests