Copied to clipboard

Flag this post as spam?

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


  • Bunnynut 136 posts 318 karma points
    Jan 06, 2023 @ 17:30
    Bunnynut
    0

    Running into issue when moving my website to new location

    What I'm trying to accomplish: to publish my website to a new location on the webserver.

    What I have done: 1. publish my website to a new location on the webserver 2. copy all files in App_Data from the old website to the new location 3. Copy all media files to the new website

    Things I'm running into: 1. The website runs but when I start it up it redirects to the umbraco login page, how do I change this? 2. When I try to login into Umbraco with my admin credentials the account doesn't exist, how can I fix this? Are the credential not stored in the database?

    Thank in advance

  • Yakov Lebski 591 posts 2347 karma points
    Jan 06, 2023 @ 19:15
    Yakov Lebski
    0

    generally, App_Data/TEMP not needed to be copied, looks like that application can't access the database

  • Bunnynut 136 posts 318 karma points
    Jan 06, 2023 @ 20:22
    Bunnynut
    0

    I have no clue what else I can do to make sure the application can acces the database?

    The connectionstring looks like the following:

      <connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
      </connectionStrings>
    

    There and Umbraco.sdf in the App_Data folder and IIS has rights to that folder. What else is there I can check?

  • Yakov Lebski 591 posts 2347 karma points
    Jan 07, 2023 @ 00:56
    Yakov Lebski
    0

    please check permission to website folder, application pool should have read/write permission

  • Bunnynut 136 posts 318 karma points
    Jan 07, 2023 @ 08:06
    Bunnynut
    0

    I gave it Full Control to the entire folder, still nothing.

    Tried it again:

    1. Website runs locally just fine.
    2. Publish website to a local folder, I notice that there is no App_Data folder in the published version. Shouldn't there be one, it's there in the project folder.
    3. I copy the contents of the published website to the webserver and run it. I get an errormessage saying that there is a connectionstring but that the application cannot connect to the database. Seems logical given the fact that the published folder cannot access the database.
    4. I Copy the AppData folder from the old website to the new one, make sure all the access rights are ok (network service and IISIUSRS have full access.

      Still when I run the website it redirects to the Umbraco login page.

    So given the first error, stating that it found a connectionstring but couldn't connect to the database, seems to be resolved because it doesn't show it anymore I guess it does connect to the database but still for some reason doesn't show me the homepage.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jan 07, 2023 @ 09:04
    Huw Reddick
    0

    I Copy the AppData folder from the old website to the new one, make sure all the access rights are ok (network service and IISIUSRS have full access.

    For .Net you should give the app pool permissions for the folder, so you need to give IIS APPPOOL\YourAppPoolName permissions

  • Bunnynut 136 posts 318 karma points
    Jan 07, 2023 @ 10:54
    Bunnynut
    0

    The Application Pool runs under the NETWORK SERVICE Identity which has full access. There is no IIS APPPOOL\User to be found.

    The old website didnt have this either and it's running under the same application pool, I just changed the home directory off the website in IIS.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jan 07, 2023 @ 12:19
    Huw Reddick
    0

    Are there any associated errors in the windows application event log?

  • Bunnynut 136 posts 318 karma points
    Jan 07, 2023 @ 13:38
    Bunnynut
    0

    After the following message nothing else.

    Exception message: Umbraco cannot start. A connection string is configured but Umbraco cannot connect to the database.
    

    As a test I gave the user Everyone full control, still the same issue. I guess we can conclude that it's not a rights issue.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jan 07, 2023 @ 13:46
    Huw Reddick
    0

    have you tried doing an IISReset from command prompt? Maybe something is being cached somewhere

  • Bunnynut 136 posts 318 karma points
    Jan 07, 2023 @ 14:04
    Bunnynut
    0

    Just did, still the same.

    I see the following in the network tab:

    http://mydomain.com/install/?redir=true&url=http://mydomain.com/
    

    So for some reason Umbraco thinks it's a fresh install.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jan 07, 2023 @ 16:01
    Huw Reddick
    0

    Is that at the same time as you are getting the error? Probably just another symptom of the same cause.

    If you point iis back to the original folder does everything work?

  • Yakov Lebski 591 posts 2347 karma points
    Jan 07, 2023 @ 16:18
    Yakov Lebski
    0

    in past, I saw an issue with SDF DB encoding, in my scenario works fine on the local machine and not on the server, just to test you can try a fresh install on the server to be sure that all configurations are correct

    1. backup DB on the server
    2. change the name of DB
    3. clean connection string and Umbraco.Core.ConfigurationStatus
    4. Restart application and install fresh Umbraco installation in SDF if it works - the issue in DB encoding. I'll find script to make the change
  • Bunnynut 136 posts 318 karma points
    Jan 08, 2023 @ 11:42
    Bunnynut
    0

    Hi Yakov,

    That sounds like a plan.

    So I backupped the database, cleared the connectionstring. I'm using Umbraco 7 so i cleared umbracoConfigurationStatus.

    It went into installation mode, upgrade popup keeps showing up, so I set umbracoConfigurationStatus to the version it want to upgrade to. So after the installation I have a clean website.

    However when I put my backup database back it shows an error about missing a table, Umbraco2UserGroups.

    It seems I'm going from one error to the next. One option that I have is to start from the clean install and add all the content again, I still have a lot of that on my local machine.

    If you have some great idea on how to fix this let me know.

  • Yakov Lebski 591 posts 2347 karma points
    Jan 08, 2023 @ 23:19
    Yakov Lebski
    0

    if clean DB is worked for you,

    I think you can check you database structure or change collation on you database(it was my issue in past)

    to inspect your database you can use a tool like https://fishcodelib.com/database.htm

    to change collation

    sqlcecmd -d "Data Source=C:\data\mydb.sdf" -z "Data Source=;LCID=1044"
    

    https://github.com/ErikEJ/SqlCeCmd

    alternative solution:

    1. export content using usync content edition and import on working database
    2. convert to SQL server express database or Umbraco 10, just remember that SDF is not supporter on Umbraco 10 and newer
Please Sign in or register to post replies

Write your reply to:

Draft