Umbraco CMS can you store views in a Database? - c#

I'd like to install umbraco in a way that will allow multiple instances to be deployed, but to share media and views between them (think "load balancing").
The default installation appears to place media and views in subdirectories of the installed Umbraco instance. For media, it would appear that the data can be moved to a central location using either S3, Azure Blob storage, or custom IFileSystem providers.
It is not clear to me whether the same can be done with Views.
Is it possible to redirect storage of views to a virtual file system? If so, how would this be accomplished.
(I don't need code, just to know what classes/configuration is needed, I'm specifically using Umbraco CMS 7.x, if this is behavior has changed since previous versions.)
Thanks in advance.

No, this is not possible.
If you are even just thinking about load balancing then make sure to follow this exact documentation, there is currently no other way of load balancing Umbraco reliably.

Also, to add to Sebastian's answer... the general way to achieve what you want is to turn on file replcation between the load-balanced servers.

Related

WKWebView - Xamarin code to extract, store and display web page along the resources (img, font, js, css etc.) for offline viewing

Is there any library in Xamarin which would store the pages that we browse in WKWebView?
Have to store the resources of the pages (CSS, fonts, js etc.) for offline viewing. The complexity is maintaining the folder structure and manage the resource Urls within the CSS and JS files. Any idea how the resources can be stored and loaded?
There are resources on how to save a html page and load the html in WKWebView.
Please note that this question is not about that. It is more about storing and managing the resources of the visited pages for offline viewing.
I don't think you're going to get your answer with a mobile only approach. It's not impossible to create one but I don't believe anything exists that will do what you want, happy to be proven wrong. I think you need to think outside the square a bit.
I can't give you the entire set of code because I don't own it (my company does) but I managed to take a website completely offline (with limitations of course) by using multiple resources to achieve the desired outcome.
I used a piece of software called Cyotek WebCopy in an Azure VM to scrape all of the website down to a folder. That folder was then zipped up and uploaded to Azure Blob Storage so it could be accessed from anywhere. The Xamarin app would then access the storage container, retrieve all of the blobs and then when a user clicks on a specific blob, it unzips down to the device and then opens up in a web view for the user to browse.
All of this was achieved using a web service and PowerShell scripts on the VM side and then of course your standard Xamarin based application for viewing.
Like I said, there are limitations to this but barring external links and database calls (like a submission page), it will work for you. It has worked for us.
It may sound like a lot of work but all in all, the VM side took me about 2 days and the Xamarin concept about 5 so all in all, not long to stand something up that is able to be built upon. I hope that helps.

Duplicate an Umbraco site to another account

Is it possible to duplicate a live Umbraco site which we have full access to (Backoffice, passwords etc.) and copy its content into another account? The idea is that we want a clone of the live site to practice on without danger of changing something and accidentally ruining the currently working and published live site.
To simplify, we have:
A working live Umbraco site with admin privileges so we can access all files.
A new, separate Umbraco account which is essentially a blank canvas with access to all files.
We would like to duplicate all the files and content from the live site to the new account just to have something that closely resembles the live site to practice building widgets etc.
We are working in Visual Studio 2012 with C# and Razor and want to use the latest version of Umbraco CMS (currently 7.3.0-beta Prerelease according to NuGet Package Manager).
Have I got the right idea with this approach or is there a better way? I am aware of Umbraco Courier but would like to know if there are any options other than a paid-for add-on.
If this is the best approach, what is the procedure, and if not, what are the options and why are they preferable?
This can be achieved quite easily by copying the files to a new environment, restoring a backup of the database to a new environment and then updating the connection string in the web.config. This will give you a working copy of the live site. If you are looking for a continuously synchronised solution then that is a different matter, Courier has never worked for me reliably.

How to change a website default document programmatically on the fly

Using ASP.NET 4.0, IIS 7.5.
I have a website engine, I have just implemented a way for this to tell if it's being loaded on mobile and instead of loading Controls\MyControl.ascx it loads Mobile\Controls\MyControl.ascx. This works well for my controls and also my MasterPage.Master file.
What I can't figure out however is how I can do the same with Default.aspx. This needs to be done on the fly programatically as I need to be able to check if it's mobile version. I was thinking of doing something on a pre-init event in globals but not sure if that's the best way.
Note: I don't want to use inline code on Default.aspx and just display different content base on my Mobile flag as my scenario goes one step further by basing the file on customer as well and this would mean having one huge Default.aspx for all customers which wouldn't be manageable.
Changing the default document on the fly is not possible in any practical sense.
Writing to the web.config on the fly to load a mobile version of a default page is quite frankly terrible and not an answer to the true context of your issue. I would feel irresponsible as a developer if I even proposed this as an answer to loading a mobile version of a default page.
I was trying to help you solve your problem and not just answer the base question in the title. As we all know, changing the web.config will restart your application and would not serve as a true solution, as you could not do this and achieve any kind of performance.
Here is the BEST alternative (IMHO) to dealing with mobile browsers.
http://51degrees.codeplex.com/
HTH!
For anyone else looking at this I have found a solution but I am not sure I will implement it as I don't like the idea of updating the web.config file at run time. Using the Microsoft.Web.Administration namespace you can update the server.webServer -> defaultDocument section programmatically. Doing this allows you to change the path to default.aspx and it will load based on the variables you set.
This link should provide more information: http://blogs.msdn.com/b/saurabh_singh/archive/2007/11/24/accessing-iis-7-0-features-programmatically-from-configuration-file-s-c.aspx
Also, the Microsoft.Web.Administration dll isn't available directly in VS so you need to add it from %windir%\syswow64\inetsrv (64bit version).

Windows application storage location

I am working on a windows app. The user has to register first to use this application. So in order to store user information, I am using MS-Access as a database. There is not much information to be stored as this application will be on individuals machine. There are few settings and some user information to be stored.
What I am feeling is that with the use of MS-Access, my application will be dependent on other application as MS-Access. It is not necessary to have the MS-office on the end user's machine.
So can you suggest me the best way to store the data safely without any dependence.
One thing I want to clear is that, the information will be of different types like it will consists of user information, some folder/files paths and some other information. I would like to keep these information separate from each other.
Thanks
Abhie
I think I found the solution.
Best practice to save application settings in a Windows Forms Application
I hope this will help others facing same problem.
Stackoverflow Team You are doing fabulous job. One suggestion; can you put some chat option for developers to discuss their problems. I think this would make it more easy to find answers to complex problems...:)
Regards
you need to include Access Database Engine drivers in the client PC, in order to connect it .
MS Access Database Engine
If you're using .NET, the best bet for getting the recommended folder locations for application data (e.g. your mdb file) is probably best retrieved using Environment.GetFolderPath
See:
http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx
You're likely interested in ApplicationData or LocalApplicationData for user specific data or CommonApplicationData for data shared by all users as your storage location (and then the proper company / product subdirectories appended to it).

Creating an "Import External Data" admin page in Sitecore

As part of the development for a website powered by Sitecore 6.3.1, I will need to implement a way to manage data from a couple of external sources in Sitecore.
To accomplish this, the simplest solution appears to be to import the external data into Sitecore as content items with a special workflow that will export them back to the external data source when they reach the final state.
I came across this article which details the code required to import data into Sitecore, but I am uncertain as to the best way to make this functionality accessible.
Considering that this process will probably (but not certainly) only be done once after the site is completed, what approach (page/Sitecore item/shell application/?) could I take to provide a way for a developer user to perform the import?
Interestingly, the Sitecore classes are available even in web forms outside of Sitecore. I created a separate .aspx file and used Sitecore.Data.Database.GetDatabase("master") to interact with Sitecore's database.

Categories