locked
ASP LOGIN DATABASE PROBLEM RRS feed

  • 問題

  •  

    Hello I am trying to setup a website with a login page, I have created the login.aspx and the default.aspx I have made the data connection for the .mdf file, but when i go to the site I recieve a server error and it show the config file I believe what is wrong is the path to the data file on the server, it is showing the path it was created in on the computer, Does someone know the proper string to use for the database

    thanks

    sirjab

    2008年11月21日 下午 05:34

解答

  • HI SirJab,

    Have you try to use Visual Studio's Administrative Tools to check if the connection has been set up correctly.

    Which SQL Server have you installed?

    Here it is the connection string that I use( From my Web.config file)

        <connectionStrings>
            <add name="SqlServices" connectionString="Data Source=MyComputerName\MSSQLSERVER2008;Initial Catalog=ASPNETDB_Login;User Id=username;Password=pw;"/>
      </connectionStrings>

    Maybe you can have a look of the URL below, which provide more information about connection string.
    http://www.connectionstrings.com/?carrier=sqlserver2005

    Hope this can help.


    2008年11月21日 下午 08:41