What is the right way to deploy Umbraco with VS2015?
Hope you can forgive my ignorance because I am new (well I can claim that I have 10+ hours experience by now).
I installed with VS2015 via NuGet package. The whole process is surprisingly smooth. It works flawlessly on the dev machine (Windows 10). I can edit the contents and see the results instantly.
I deployed the website to another machine using the publishing method "File system" for convenience. I get the following error when browsing the home page:
No physical template file was found for template Home
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: No physical template file was found for template Home
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: No physical template file was found for template Home]
Umbraco.Web.Mvc.RenderMvcController.CurrentTemplate(T model) +212
lambda_method(Closure , ControllerBase , Object[] ) +94
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +67
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137
However, the BackOffice seems to work perfectly on the destination machine. I can the template for the home page - "Template"
I think VS Deploy only includes files that are part of the project, so if you created your templates via the back office (most likely) you will need to manually included them in your project. (ie right+click the file - include in project) - You may need to "Show All Files" in your solution in order to see the files before you can include them.
Thanks a lot, Ismael. I believe that is the right way to do it.
I made it work by examining the files (outside VS) on the dev machine and those on the destination machine, and copying all of the files (a lot of them, not created by me) of folders View, css and js, Media. Copying Umbraco.sdf is also critical.
FYI, the Umbraco.sdf file is the SQL Server CE database. That is fine for testing purposes, but that will cause you tons of pain later down the road. You should switch to SQL Server as soon as possible to avoid issues.
When you install Umbraco, you have a choice of which database to install to (if you accept the defaults, you will get SQL Server CE). Your choices are SQL Server CE, SQL Server, and MySQL.
SQL Server CE is sort of like a toy database. It lacks the robustness of the other two. For one, it doesn't support stored procedures. Also, it doesn't support some bulk operations, which can cause real performance problems with large Umbraco websites (I've run into them personally when dealing with lots of user accounts). CE also doesn't support parallelism, scale, and fault tolerance as well as the others.
You can also get into issues because it's not necessarily easy to port from CE to SQL Server. Probably best to start in SQL Server in the first place, unless what you are building is going to be thrown away.
Thanks a lot for the elucidation. I made up my mind immediately when I saw " it's not necessarily easy to port from CE to SQL Server". I originally thought that I would live with CE for this lightweight personal website for now, and migrate it later when issues arose. It looks that I cannot wait. I will look for the information to switch the database.
What is the right way to deploy Umbraco with VS2015?
Hope you can forgive my ignorance because I am new (well I can claim that I have 10+ hours experience by now). I installed with VS2015 via NuGet package. The whole process is surprisingly smooth. It works flawlessly on the dev machine (Windows 10). I can edit the contents and see the results instantly.
I deployed the website to another machine using the publishing method "File system" for convenience. I get the following error when browsing the home page:
However, the BackOffice seems to work perfectly on the destination machine. I can the template for the home page - "Template"
Hi,
I think VS Deploy only includes files that are part of the project, so if you created your templates via the back office (most likely) you will need to manually included them in your project. (ie right+click the file - include in project) - You may need to "Show All Files" in your solution in order to see the files before you can include them.
Cheers.
Thanks a lot, Ismael. I believe that is the right way to do it.
I made it work by examining the files (outside VS) on the dev machine and those on the destination machine, and copying all of the files (a lot of them, not created by me) of folders View, css and js, Media. Copying Umbraco.sdf is also critical.
FYI, the
Umbraco.sdf
file is the SQL Server CE database. That is fine for testing purposes, but that will cause you tons of pain later down the road. You should switch to SQL Server as soon as possible to avoid issues.Thank you for the tip. I know that I can copy it only once, otherwise all newly created contents will be overwritten.
Could you point me to a source explaining the databases issues? The destination has a SQL server.
When you install Umbraco, you have a choice of which database to install to (if you accept the defaults, you will get SQL Server CE). Your choices are SQL Server CE, SQL Server, and MySQL.
SQL Server CE is sort of like a toy database. It lacks the robustness of the other two. For one, it doesn't support stored procedures. Also, it doesn't support some bulk operations, which can cause real performance problems with large Umbraco websites (I've run into them personally when dealing with lots of user accounts). CE also doesn't support parallelism, scale, and fault tolerance as well as the others.
You can also get into issues because it's not necessarily easy to port from CE to SQL Server. Probably best to start in SQL Server in the first place, unless what you are building is going to be thrown away.
Thanks a lot for the elucidation. I made up my mind immediately when I saw " it's not necessarily easy to port from CE to SQL Server". I originally thought that I would live with CE for this lightweight personal website for now, and migrate it later when issues arose. It looks that I cannot wait. I will look for the information to switch the database.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.