Results 1 to 10 of 10

Thread: [2005] How do I move my ASPNETDB.MDF to my website?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    150

    [2005] How do I move my ASPNETDB.MDF to my website?

    I have created a login page and applied some rules and every thing is working perfectly on my machine , now how can I move everything to my website ? do I upload my ASPNETDB.MDF to my website ? If so , how do I link my login pages to connect to the database ?

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    There is a folder called app_data created by VS when automatically or you can add it as manually. put your mdf file there and change your DB connection string to attach DB from file
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    And make sure your connection string is correct, and that it reflects what the new structure might be on the remote box.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    150

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    Where do I place a connection string ? and what is the correct format ?

  5. #5
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    You can place it where ever you want. the "web.config" is a good idea (but make sure you encrypt it if it has the login info (password).

    And there is no 1 connection string format, you can check this website for methods to build your connection string
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  6. #6
    New Member the_menace's Avatar
    Join Date
    Jul 2007
    Location
    Sacramento, CA
    Posts
    12

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    Don't the web.config already do this automatically for you when you created the database anyways? The connection string should be in place in there already, and it is just a matter of re-configuring it to your remote server.

  7. #7
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    Quote Originally Posted by the_menace
    Don't the web.config already do this automatically for you when you created the database anyways? The connection string should be in place in there already, and it is just a matter of re-configuring it to your remote server.
    Only when using wizards
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    150

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    Sorry but I didn't get it ,

    I already have a folder called App_Data , I uploaded this folder to my website , then what ?

    I looked in to the web.config file and all I can see is this:


    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
        <system.web>
          <authorization>
                <allow roles="Administrator" />
                <deny users="?" />
            </authorization>
        </system.web>
      </configuration>
    do I need to add the connection string in between these lines and am all set ?


    Oh and my webhosting company supports using (MS SQL Database) , is that the same as (Microsoft SQL Server 2005) ?
    Last edited by bomayed; Jul 16th, 2007 at 07:25 AM.

  9. #9
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    1- well, you have to ask.. MS SQL might mean SQL 2000 or SQL 2005 (which supports both)
    2- The app_data must contain your DB .mdf file to work.
    3- You need to change the connection string where ever you put it. and in your case it's not in the web.config. (even though putting it in the web.config would be a better idea)
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] How do I move my ASPNETDB.MDF to my website?

    You really should contact your host and ask them these details. They might have a different folder just for MDFs and you'll need to change your connection string to reflect that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width