I'm looking to move umbraco from a dev website into live soon but i have run into trouble restoring it in the new location.
I've back up the current dev version and moved it to my new server but now i get a run time error when i try to load the website.
The process i followed is as such.
1) zipped up and downloaded the entire site
2) set up new website in IIS
3) unzip website into new location
4) run time error.
I havent modified my web config, when i looked at the one from the the site im trying to restore i couldnt see anything different in there between a fresh install.
I did this process many times but i was only moving the website from one directory to another on the same server. It worked and i thought id cracked it (i restored database in MSQL management and it seemed to work) but then i discovered that the database itself is stored as a file in the app data folder?
One difference is that i have moved from one server to a VM on my laptop (i'm still trying to figure it out before i mess with anything live).
Connection string:
<connectionStrings>
<remove name="umbracoDbDSN" />
<add name="local" connectionString="" providerName="" />
<!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" /></connectionStrings>
I also get an Event ID 1309 i can post the full message if required, i omitted it this time as its quite a long message.
I was wondering if it could be this:
When i first restored an umbraco site on the same server i still created an umbraco database in MSSQL management. After discovering that the file is located in appdata as an .sdf file i assumed (possibly incorrectly) that i did not need to create a database and could just use the .sdf file.
Anyway, I'm not sure what kind of information might be useful but i can provide more if required. I'm very new to Umbraco and IIS so am still learning.
Yes the permissions issues was my undoing when i first started so i remembered to check that hoping that would fix it.
I've had a look in the logs. I hope this comes through formatted. Apologies if it doesnt
2017-04-26 11:02:52,453 [P1536/D2/T1] ERROR Umbraco.Core.ApplicationContext - Error determining if application is configured, returning false
System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName)
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at Umbraco.Core.Persistence.Database.CommonConstruct()
at Umbraco.Core.Persistence.UmbracoDatabase..ctor(String connectionStringName, ILogger logger)
at Umbraco.Core.Persistence.DefaultDatabaseFactory.CreateDatabase()
at Umbraco.Core.DatabaseContext.get_DatabaseProvider()
at Umbraco.Core.DatabaseContext.get_CanConnect()
at Umbraco.Core.ApplicationContext.<Init>b__0()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I thought i had figured it out a few weeks ago until i discovered it was all stored in .sdf.
Do i still need to create a database in MSSQL management even though it is an .sdf format? Possibly for permissions?
To be honest, I'm a WordPress dev more than anything. MySQL and php are about as complicated as i usually get.
Anyway, i hope that is some of the info you wanted. If you need any more please let me know.
I took a look in the /bin directory and the DLL's were there.
Also made sure i had given sufficient permissions and checked the file name for the .sdf which was correct.
After reading through the other article you mentioned i followed kipusoep's suggestion of adding a new run time assembly in my web config and this seems to have fixed my issue.
I also noticed that there was some strange characters in my web config, looked like some kind of encoding issue but i'm not sure. I removed those for good measure and everything is all good.
I've been able to back up and restore my Umbraco installation from one server to another.
Thanks for your time helping me Alex. I've been pulling my hair out for days with this!
Restoring umbraco to a new server
Hi,
I'm looking to move umbraco from a dev website into live soon but i have run into trouble restoring it in the new location.
I've back up the current dev version and moved it to my new server but now i get a run time error when i try to load the website.
The process i followed is as such.
1) zipped up and downloaded the entire site 2) set up new website in IIS 3) unzip website into new location 4) run time error.
I havent modified my web config, when i looked at the one from the the site im trying to restore i couldnt see anything different in there between a fresh install.
I did this process many times but i was only moving the website from one directory to another on the same server. It worked and i thought id cracked it (i restored database in MSQL management and it seemed to work) but then i discovered that the database itself is stored as a file in the app data folder?
One difference is that i have moved from one server to a VM on my laptop (i'm still trying to figure it out before i mess with anything live).
Connection string:
I also get an Event ID 1309 i can post the full message if required, i omitted it this time as its quite a long message.
I was wondering if it could be this:
When i first restored an umbraco site on the same server i still created an umbraco database in MSSQL management. After discovering that the file is located in appdata as an .sdf file i assumed (possibly incorrectly) that i did not need to create a database and could just use the .sdf file.
Anyway, I'm not sure what kind of information might be useful but i can provide more if required. I'm very new to Umbraco and IIS so am still learning.
Thanks,
PhilB
Hi Philb1208
Can you folders permissions on the new server?
It should be like described here:
https://our.umbraco.org/documentation/getting-started/setup/install/permissions
Also check please Log entries, maybe there some description of errors?
Look at /App_Data/Logs
Thanks,
Alex
Hi Alex,
Thanks for replying!
Yes the permissions issues was my undoing when i first started so i remembered to check that hoping that would fix it.
I've had a look in the logs. I hope this comes through formatted. Apologies if it doesnt
I thought i had figured it out a few weeks ago until i discovered it was all stored in .sdf.
Do i still need to create a database in MSSQL management even though it is an .sdf format? Possibly for permissions?
To be honest, I'm a WordPress dev more than anything. MySQL and php are about as complicated as i usually get.
Anyway, i hope that is some of the info you wanted. If you need any more please let me know.
Thanks,
Phil
Hi Phil
You don't need to create MSSQL database if you are using .sdf database.
Just be sure that connection string in web.config points to the right database.
Also check please /bin folder, are there all dlls?
And read this topic - https://our.umbraco.org/forum/getting-started/installing-umbraco/39207-Could-not-load-file-or-assembly-SystemDataSqlServerCe#comment-143111
Hope it will help you.
Thanks,
Alex
Hi Alex,
I took a look in the /bin directory and the DLL's were there.
Also made sure i had given sufficient permissions and checked the file name for the .sdf which was correct.
After reading through the other article you mentioned i followed kipusoep's suggestion of adding a new run time assembly in my web config and this seems to have fixed my issue.
I also noticed that there was some strange characters in my web config, looked like some kind of encoding issue but i'm not sure. I removed those for good measure and everything is all good.
I've been able to back up and restore my Umbraco installation from one server to another.
Thanks for your time helping me Alex. I've been pulling my hair out for days with this!
Thanks again Alex, your help is much appreciated.
Regards,
Phil
Hi Phil
You are welcome, I'm helping with pleasure!! Glad that this topic is solved now.
Have a nice evening.
/Alex
is working on a reply...