Database connection settings and Login failed for user 'sa'.

Last post 04-08-2011, 8:29 PM by Jeff. 7 replies.
Sort Posts: Previous Next
  •  04-08-2011, 4:39 AM 67084

    Database connection settings and Login failed for user 'sa'.

    hi,
     
    My computer named 'Home', from local computer, i use microsoft sql server 2008 to create Cutechat database. My sql server connect with:
     
    name: sa
    passwork: abcd123456
     
    After creating Cutechat database by runing sql script (included installation package). Copying Cutechat.mdf and CuteChat.log to Web directory, modifying web.config like this (in Web directory):
     
    <?xml version="1.0"?>
    <configuration>
        <appSettings>
            <add key="ConnectionString" value="server=(local);database=Cutechat;uid=sa;pwd=abcd123456"/>
               <add key="OnlineTimeout" value="300"/>
        </appSettings>
        <system.web>
            <customErrors mode="Off"/>
            <authentication mode="Forms">
                <forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>
            </authentication>
            <authorization>
                <allow users="*"/>
            </authorization>
            <trace enabled="true"></trace>
            <sessionState mode="InProc" timeout="20"/>
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
        </system.web>
    </configuration>
     
    Then i upload all of Web's content on my host by FTP like this:  www.xyz.cn/online. But i receive an error like: Login failed for user 'sa'.
     
    What was i wrong ? Please help me, thanks
     
     
    I'm sorry, i clicked two times to post
  •  04-08-2011, 5:00 AM 67086 in reply to 67084

    Re: Database connection settings and Login failed for user 'sa'.

    Hi compvis,
     
    It mean that the authentication information below wrong. have you get this info work with other site before?
     
    Can you try login you sql server by the info below? Does it work?
    name: sa
    passwork: abcd123456
     
    Keep me posted.
     
    Regards,
     
    Ken
     
  •  04-08-2011, 5:03 AM 67087 in reply to 67084

    Re: Database connection settings and Login failed for user 'sa'.

    Hi compvis,
     
    Please open Microsoft SQL Server Management Studio
     
    1.  Open the Context menu of you Sqlserver and click Properties, perhaps your sever name is "Home"
    2.  Click Security on the left menu list
    3.  Check the SQL Server and Windows Authentication mode under Server authentication section
    4.  Save and test again.
    Hope this helps. 
     
    Regards,
    Jeff 
  •  04-08-2011, 6:44 AM 67092 in reply to 67087

    Re: Database connection settings and Login failed for user 'sa'.

    Jeff:
    3.  Check the SQL Server and Windows Authentication mode under Server authentication section
     
    Yes, i always check this when install Ms Sql Server
     
     
  •  04-08-2011, 6:52 AM 67093 in reply to 67086

    Re: Database connection settings and Login failed for user 'sa'.

     
    Kenneth:
    Can you try login you sql server by the info below? Does it work?
    name: sa
    passwork: abcd123456
     
    Hi Ken,
     
    I normally login Ms SQL server with sa and abcd123456 in my computer
     
    Maybe differences between local computer and host ? Or i have to login my computer in Windows mode instead of mix mode when create Cutechat database ?
     
    Please help ?!
     
    I have a suggest: Cutechat should have an installation wizard on host (run this wizard after uploading on host). This wizard allows developers set up  params: database name, user name, password, creating database... instead of creating database and setting from local computer.
    Thanks,
  •  04-08-2011, 9:06 AM 67096 in reply to 67093

    Re: Database connection settings and Login failed for user 'sa'.

    Hi compvis,
     
    You need to  get an Database User in DBO role of your host's Sql server
    The config of Sql server on host is not the same as your local server.
     
    Regards,
    Jeff
  •  04-08-2011, 8:11 PM 67103 in reply to 67096

    Re: Database connection settings and Login failed for user 'sa'.

    Hi Jeff,
    I think i have to attach CuteChate database to host
     
    Regdards,
     
    Compvis
  •  04-08-2011, 8:29 PM 67104 in reply to 67103

    Re: Database connection settings and Login failed for user 'sa'.

    Hi Compvis,
     
    Yes, your host website can not access your local sql server
     
    Regards,
    Jeff 
View as RSS news feed in XML