Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASPNETDB.MDF

ASPNETDB.MDF

Scheduled Pinned Locked Moved ASP.NET
databasesysadminsecurityhelpquestion
6 Posts 4 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abdulhafeezo
    wrote on last edited by
    #1

    I uploaded the default aspnetdb.mdf database an my web server but i still cannot figure out a way to make my web application interface with de data base. the connection string on my localhost is: Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True could any1 pls help me modify it to a working connection with a web server?

    V A S 3 Replies Last reply
    0
    • A Abdulhafeezo

      I uploaded the default aspnetdb.mdf database an my web server but i still cannot figure out a way to make my web application interface with de data base. the connection string on my localhost is: Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True could any1 pls help me modify it to a working connection with a web server?

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Do you get any Errors ? and what are the Erros ?

      Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      1 Reply Last reply
      0
      • A Abdulhafeezo

        I uploaded the default aspnetdb.mdf database an my web server but i still cannot figure out a way to make my web application interface with de data base. the connection string on my localhost is: Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True could any1 pls help me modify it to a working connection with a web server?

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Do not attach file when you are in the production server, rather do like this : 1. Create a Login for ASPNET Account to the SQL Server instance 2. Attach the ASPNET.MDF file to the SQL Server itself using CREATE DATABASE [ASPNET] ON ( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF' ), ( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB_log.LDF' ) FOR ATTACH Run it in Master Database. :)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Windows7 API Code Pack
        Simplify Code Using NDepend
        Basics of Bing Search API using .NET

        A 1 Reply Last reply
        0
        • A Abhishek Sur

          Do not attach file when you are in the production server, rather do like this : 1. Create a Login for ASPNET Account to the SQL Server instance 2. Attach the ASPNET.MDF file to the SQL Server itself using CREATE DATABASE [ASPNET] ON ( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF' ), ( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB_log.LDF' ) FOR ATTACH Run it in Master Database. :)

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Windows7 API Code Pack
          Simplify Code Using NDepend
          Basics of Bing Search API using .NET

          A Offline
          A Offline
          Abdulhafeezo
          wrote on last edited by
          #4

          I still did not get the explaination you did. pls explain it to me cos am a bit too dol.

          A 1 Reply Last reply
          0
          • A Abdulhafeezo

            I still did not get the explaination you did. pls explain it to me cos am a bit too dol.

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            I meant you need to attach the database to a database instance installed in your operating system. :)

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Windows7 API Code Pack
            Simplify Code Using NDepend
            Basics of Bing Search API using .NET

            1 Reply Last reply
            0
            • A Abdulhafeezo

              I uploaded the default aspnetdb.mdf database an my web server but i still cannot figure out a way to make my web application interface with de data base. the connection string on my localhost is: Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True could any1 pls help me modify it to a working connection with a web server?

              S Offline
              S Offline
              suyogm
              wrote on last edited by
              #6

              try changing the AttachDbFilename attribute in Connection string. It might help you. Data Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|ASPNETDB.MDF";Integrated Security=True;User Instance=True

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups