Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ed 20 posts 40 karma points
    May 20, 2010 @ 20:48
    Ed
    0

    Copied site, can't log in

    I took a working site and copied into a new location so I could use it as a base for a new site.  The new site comes up with content, but when I try to log in, it takes the admin user and password, but just goes back to the login form again.What did I miss?

    Here is what I did:

    Copied the database to a new database on the server.  Made sure the login was set up.

    Copied the entire directory structure of the original site to a new folder, set up application in IIS 6.

    Gave Network Service full control of the new folder and everything inside.

    Edited web.config to change the name of the database to the new database in the connection

    Set up DNS entry to point to new site.

    What did I miss?

    Thanks.

  • Jeff Grine 149 posts 189 karma points
    May 20, 2010 @ 21:43
    Jeff Grine
    0

    Are you using MS SQL? Have you tried logging into the database using that user through SSMS? If you can't, could be that the login you created has a different ID than the database user. You can fix that with this

    sp_change_users_login @action='Auto_Fix', @usernamepattern='username'
  • Ed 20 posts 40 karma points
    May 20, 2010 @ 22:17
    Ed
    0

    Jeff,

    thanks for the reply.  I used the same SQL login as for the original site (same SQL Server instance)  I checked the login and it works.  The site displays the content.  There must be some pointer somewhere or someting in a config file that needs to be changed beyond what I did?

  • Jeff Grine 149 posts 189 karma points
    May 20, 2010 @ 23:20
    Jeff Grine
    0

    I don't think you're missing any steps, should be just that simple.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 21, 2010 @ 03:13
    Nik Wahlberg
    0

    You may want to try and run the install utility and see if that fixes your issues (or at least make sure that it sees your site using the correct connection). so, http://yoursite.local/install/ (make sure you have a backup before running this).

    HTH,
    Nik 

  • Ed 20 posts 40 karma points
    May 21, 2010 @ 19:15
    Ed
    0

    Nik,

    Thanks.  Same thing happens.  When I go to the install section, it routes me to the login page, then I can't get past it.

  • Ed 20 posts 40 karma points
    May 21, 2010 @ 19:52
    Ed
    0

    It writes entries into the umbracoLog table, so I know for sure it is talking to the correct database.  I've verified that the IIS settings are exactly the same as the original site.  They are on the same server.  I've stopped and restarted the site in IIS. Edited and resaved web.config to get an ASP.Net application start.  No help.

  • Ed 20 posts 40 karma points
    May 21, 2010 @ 20:35
    Ed
    0

    I have it working now, although I'm not totally sure why.

    I examined the original web.config file from the blank installation.  I knew there had to be something to trigger the app to automatically go to the install section.  What I found was this entry:

    <add key="umbracoConfigurationStatus" value="" />

    In my site, the value is 4.0.3.  So I set the value back to "", saved the file and navigated to the new site again.  This time, it automatically sent me to the install section.  I went through the steps, it recognized the database connection, and completed.  Then I was able to log in!  It didn't erase anything either. 

    The installation section writes 4.0.3 back into the value of the key in web.config.  It must be writing something somewhere else too, otherwise I wouldn't have had to go through all this.  I am very curious as to what, but I don't have time to read through the source code right now.

    Anyway, the bit of knowledge here is that  you can copy a site and its data to a new site, but you need to set the umbracoConfigurationStatus key value to "" and let it walk you through the install steps again.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    May 21, 2010 @ 20:44
    Peter Dijksterhuis
    0

    Do you have 2 different web.configs perhaphs?

    1 with passwords as clear and 1 with passwords hashed? That would explain the behaviour. Rerunning the installer makes you reset the admin-password, so that gets freshly written to the db again (in the format specified in the web.config)

    Not sure how the hashing works, but that might be site-dependant as well.

    Peter

  • Ed 20 posts 40 karma points
    May 21, 2010 @ 21:28
    Ed
    0

    Only have one web.config.  It doesn't make you reset the password if it isn't 'default'.  At least it didn't make me reset mine.

  • Ed 20 posts 40 karma points
    May 25, 2010 @ 03:00
    Ed
    0

    Well I came back after the weekend and I can't log in again!  I tried the trick above, but it doesn't work this time.  I downloaded the 4.0.4.1 upgrade and applied it, but still can't log in.  I enter the username and password, and it just routes back to the log in screen.  In know it is taking the password because it doesn't add the red borders like it does if you use the wrong password.

    The site displays just fine, I see log entries in the database, so I know for sure it is connecting to the database. 

    Anyone have any other ideas? What could I have missed? 

    My whole goal was to build up a site with all my core stuff in it, then be able to copy that to new sites and start from there, rather than have to start a clean install every time.  If that doesn't work with Umbraco, I need to know why.

    Thanks.

  • mfeola 117 posts 221 karma points
    Oct 26, 2010 @ 17:02
    mfeola
    0

    I am having the same issue.  First I tried copying everything from the original site and making a second database from the backup of the original database on a new server and that is where the problem started.  Since then I have tried putting in a clean install of the files which did not change anything but when i used a clean install of the files and made a new database i was able to set up umbraco with the install wizard without issue.  Once I tried to copy over the old database again was when I ran into the same problem again. Maybe there is another way to copy database information? When I connect to my old database on the new server everything works fine.

    I just finished making over 4 thousand pages for this site and I NEED to get this site on this server for the client to see it.  It took a full day to import all the files to the old server and if I have to do that again for this new server and then the live server after this I may just quit programming all together! 

  • mfeola 117 posts 221 karma points
    Oct 26, 2010 @ 19:26
    mfeola
    0

    I think i got it.  that data folder was screwing things up, App_Data.  I went through the following steps so far everything checked out.

    1. created a new fresh install of umbraco on the new server including empty DB and clean files
    2. changed the web.config to point to the database containing the copied information from the original server
    3. copied over media files, xslts, usercontrols, and any other folder i had added information to manually
    4. i had added linq so for when i copied the app_code folder files over i had to add the assembly reference to the web.config
    5. install the umbraco packages again which may not appear in your package directory (i only had to re-install imagegen)
    so far everything is still working fine for me.  I hope this helps you out

  • Rik Helsen 670 posts 873 karma points
    Oct 27, 2010 @ 09:49
    Rik Helsen
    0

    Have you checked file permissions for everything you copied? Application pool user could be set to wrong, files could be marked as "unsafe" because you copied them from one environment to another...

    the fact that the homepage is still rendering is because it's just outputting the xml cache on disk, and not querying the database.

  • Rik Helsen 670 posts 873 karma points
    Oct 27, 2010 @ 09:53
    Rik Helsen
    0

    ps. are versions of IIS and SQL identical or are there differences? you're not trying to run the website in a virtual directory?

Please Sign in or register to post replies

Write your reply to:

Draft