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

Last post 04-08-2011, 11:21 AM by Eric. 1 replies.
Sort Posts: Previous Next
  •  04-08-2011, 4:38 AM 67083

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

    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
     
     
  •  04-08-2011, 11:21 AM 67098 in reply to 67083

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

    Dear compvis,
     
    "Copying Cutechat.mdf and CuteChat.log", this step is incorrect, you don't need copy these two files, you can execute sql script against your database directly.
    <add key="ConnectionString" value="server=(local);database=Cutechat;uid=sa;pwd=abcd123456"/>, this line is database connection string, please change "server=(local)" to "server=yourip".
    "CuteChat" is database name, please change it to your actual database name.
    uid is the username who has permission to access the database.
    pwd is the password of that user.
     
    If you need further help, please let me know.
     
    Thank you for asking
     
View as RSS news feed in XML