Sitecore license on Deployment - sitecore

I've deployed my Sitecore project to the server and Im receiving the error
Required license is missing: Runtime Description: An unhandled
exception occurred .....
Exception Details: Sitecore.SecurityModel.License.LicenseException:
Required license is missing: Runtime
Do I need to download and install the Sitecore CMS Setup and enter the license key in that on the server ? I was expecting it all to be contained within the file structure of the web site.
PS/ Exscuse the fact that this is a pretty simple question - extremely pushed for time. Many thanks,

The Sitecore license file is an XML file that is located in your \Data folder by default. It is also named "license.xml" by default. You should have a reference to this file in your web.config file:
<!-- LICENSE
This value define the physical location of the license file.
Can be site path (ex. /folder/...) or absolute (ex. c:\folder\...)
-->
<setting name="LicenseFile" value="$(dataFolder)/license.xml" />
If your site is working in another environment but not your deployment environment, ensure that your path for the \Data folder is the same on this server. Change the path of the dataFolder variable if the path is different:
<sc.variable name="dataFolder" value="D:\<YOUR_PATH_HERE>\Data" />
Hope this helps.

Related

Setting specifies the context site for experience editor

I am working on multisites and I want to open experience editor for the context site, but sitecore doesn't resolve the context site and it always takes me to the default website, there is a setting in sitecore.config file i set it to "true", but still it takes me to the default website :
http://mywebsite.local/?sc_mode=edit&sc_site=website
here is the setting in sitecore.config, my sitecore version is 8.1 (Update 2)
<!-- PREVIEW - RESOLVE SITE
If false, the Preview.DefaultSite setting specifies the context site to use when a user previews an item.
If true, when a user previews an item, Sitecore tries to resolve the root item and the context site based on the current content language
and the path to the item. If Sitecore cannot resolve the context site, it uses the site that is specified in the Preview.DefaultSite setting.
Default value: false (use the value of the Preview.DefaultSite setting)
-->
<setting name="Preview.ResolveSite" value="true"/>
I have also face this issue before and it is known bug in sitecore. I have tried approach mentioned in below article. (However I am still facing this issue intermittently whenever I copy new dll in sitecore website.)
https://kb.sitecore.net/articles/382913
I have already placed all the files at my one drive link. Please take a backup of your existing file ("WebEditRibbon.aspx ) before replacing
https://1drv.ms/f/s!AotVzR-_yI5ObO5-Pzq02mcx-EU
This Reported as bug in Sitecore 8.1 (Update 2), and this is the fix from support team :
Open the “/sitecore/client/Applications/Launchpad/PageSettings/Buttons/ContentEditing/ExperienceEditor” item in the core database
Change the “Link” field value to:
/?sc_mode=edit&sc_resolvelanguage=0
Updated Answer :
For multi-sites, you need to apply anothor fix I did not find its number on https://kb.sitecore.net/ so i uploaded the required files on dropbox :
Download Sitecore.Support.88883.zip, from this Link
Copy the attached Sitecore.Support.88883.dll file to the /bin folder of your website;
Copy the attached Sitecore.Support.88883.config file to App_Config/Include folder of your website;
Open the "/sitecore/client/Applications/Launchpad/PageSettings/Buttons/ContentEditing/ExperienceEditor" item in the core database
Change the “Link” field value to: /?sc_mode=edit&sc_resolvelanguage=1
Clear the browser cache.

Required license is missing: Runtime Sitecore

I am getting this error
Required license is missing: Runtime
I have checked datafolder path
<sc.variable name="dataFolder" value="C:\Path\Data" />
and license file settings
<setting name="LicenseFile" value="$(dataFolder)/license.xml" />
also checked permission all is correct but still it is giving error.
The most likely cause is a patch file in the include folder that is changing your path. Sometimes this is called "DataFolder.config" and may have the default path set in it, which will overwrite the setting value you might have in another patch config or in the Web.config file.
There are some tools that let you track down config settings without having a working Sitecore instance. I would try out the Config Builder (https://marketplace.sitecore.net/Modules/Sitecore_ConfigBuilder.aspx) which should be able to load up all your config settings and help you track down the problem.
I know it is a pretty late to answer, but for folks who end up here - this might be helpful.
There could be couple of reasons why you get this error. Since OP had already mentioned that his license file has not expired - Another viable reason is
The datafolder path is wrong. the first line of the Sitecore.config line defines the datafolder path. For eg: something like this:
<sc.variable name="dataFolder" value="C:\Inetpub\wwwroot\sitecoredev\Data\"/>
if you have any developer create a different instance name or folder and checks it in, it will not find the path and hence you will get this error.
Check if the licence file has expired:
Confirm that the expiration date in the licenses has not been reached or passed. Open the license.xml file with a text editor and search for “expires”; find the line corresponding to the “20060319”. If the date has been reached or passed (for instance, if it is March 19, 2006 or later), the license will not work; obtain an updated license.
https://sdn.sitecore.net/Articles/Troubleshooting/License%20Issues.aspx
I have installed 8.2 update 5 on my local machine. The default installation adds a folder called 'zzz' in App_config/include folder and creates DataFolder.config in that folder and references the data folder name from that config file. My publish overwrote/deleted that folder and i got the error 'Required license is missing: Runtime Sitecore'.
Adding that folder 'zzz' from my backup site resolved that issue.
I have also noticed that even if after fixing the path you may still see this error. Once you fix path with valid license, DON'T forget to reset IIS/ Apppool.
Below are the possibilities for the error.
Verify if the license file is present - You can check this in the default data directory of the Sitecore installation path. If the file is not there add it here and restart the IIS.
The path of the License file is wrong - The default path of the Sitecore license file will be specified in the “web.config,” and if you are using the Sitecore 8+ version, then verify Sitecore.config file(App_config/Sitecore.config) where LicenseFile settings are provided
Overriding the License file path - If you are using any Patch files or thrid-party libraries like brainjocks then make sure the patch file is not overriding the default path.
License expired - Don't forget the check if you provided license is been still active or expired. You can do this by opening the license.xml in editor and verifying the field "expiry" and the date.
Config File settings
<sc.variable name="dataFolder" value="/data" />
<setting name="LicenseFile" value="$(dataFolder)/license.xml" />
Source - Sitecore Required license is missing: Runtime [Solved]
Something to watch out for: I had multiple config files for different environments (e.g. DataFolder.QA.config, DataFolder.Live.config) which were overriding my DataFolder.config with values that were incorrect for my local environment. Deleting the unneeded environment configs got this working.
if you have doubt whether sitecore is looking into correct place, check out /sitecore/admin/showconfig.aspx page. this is what sitecore really uses after combining all configurations. You can chekc both <sc.variable name="dataFolder" value="C:\Path\Data" /> and <setting name="LicenseFile" value="$(dataFolder)/license.xml" /> there. Of course this page only shows <sitecore>...</sitecore> part of configuration.
Also make sure that NETWORK SERVICE account or <your IIS app pool name here> account (depending on which Identity is bound to your App Pool instance) has full access to Data folder and also App_Data subfolder inside webroot, just to rule out any read/write access issue

sitecore multi site set up in visual studio 2012

I want to set multi site setup in Visual studio for multiple sites in Sitecore. I want to have separate Layouts/sublayouts/ascx and code behind for all websites. Also i want separate config files for each website so that it will be easy to update individual sites. i didn't find any appropriate documentation from web.
Any help
This is what I do as far as Sitecore and Visual Studio structure goes:
1) Create sub folders for your sites in Sitecore within the Content, Layouts, Templates and Media Library folders.
2) Create sub folders in your web root on disk. Do this for the Layouts/View folder, but also for the client-side includes (css/js).
So you will get a structure like this:
3) Create a separate web application project for each site and place the .csproj file inside the web root.
Then include the necessary folders per project (so the Include/Site1, Views/Site1 folder are included in the project for Site1, etc).
4) Configuration is a little tricky, because you will always share one Sitecore configuration with all the site instances.
But what I do for settings is prefix them with the site name, like this:
<setting name="Site1.MySetting" value="MyValue" />
You can then put that in separate config files in the /App_Config/Include folder.
That will give you at least some separation of configuration per site.
I would create at least one sub folder within the Include folder to ensure your custom configuration is included as last.
5) I will usually also add one "site" project called Global that contains everything that is shared between the instances.
That will mainly contain templates in Sitecore and in the VS project it contains references to /sitecore files, global.asax, web.config and App_Config files.
There are of course many more factors to account for, but these are the basics for setting up the solution.
I think this should be the documentation you are looking for:
http://sdn.sitecore.net/Articles/Administration/Configuring%20Multiple%20Sites.aspx
Here is a great blog I've read:
http://www.sitecore.net/Community/Best-Practice-Blogs/Topics/Multisite-Management.aspx
I have multiple solution files set up for multiple sites.
A suggestion would be to also move the App_Config, web.config, and bin libraries into the solution helps.
Setting up Sitecore Rocks will also be a great asset.
Edit: More Info
Hedgehog development has an amazing plugin for Sitecore as well called Team Development for Sitecore (TDS). You can check it out here.
http://www.sitecore.net/Partners/Technology-Partners/Hedgehog-Development.aspx
http://www.hhogdev.com/products/team-development-for-sitecore/overview.aspx
I point my solution at: \inetpub\wwwroot\sitecore\Website
At the root of my solution:
App_Config folder which holds my connection string configs and Lucene configs.
Libraries folder which holds my application specific dlls.
Sites folder which holds the sites and all the respective sublayouts. Sites contains multiple websites which all contain at a minimum of css, Images, layouts, Services, Scripts, and Sublayouts.
The server's web.config with web.debug and web.release.
All of this is checked into Team Foundation Server with build servers and more.
For the layouts and sublayouts you can separate them like Rudd van Failer showed us above in VS, using directories named like your site (and point the layouts/sublayouts in sitecore to the appropriate places).
i.e.
For configuring your sites in VS, add all your site configurations to the SiteDefinition.config (or setup separate projects that contain their own SiteDefinition.config pointing each site to the appropriate sitecore location). i.e.
<sites>
<site name="site1" patch:before="site[#name='website']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/" startItem="/site1/home page" />
<site name="site2" patch:before="site[#name='website']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/" startItem="/site2/home page" />
</sites>

How do I add a custom .aspx page to sitecore?

I've recently created an aspx and aspx.cs page that needs to run alongside a sitecore website. Does anyone know how i can add these pages into the site? Our set up is very odd and would like to know recommendations before trying anything and risking breaking our setup.
You don't necessarily have to add your page to the IgnoreUrlPrefixes.
Before the ItemResolver is executed, the FileResolver is executed which checks if your request points directly to a file on disk.
You do need to configure the allowed URL extensions in the FilterUrlExtensions processor of the preprocessRequest pipeline, as such:
<preprocessRequest
<processor type="Sitecore.Pipelines.HttpRequest.FilterUrlExtensions, Sitecore.Kernel">
<param desc="Allowed extensions (comma separated)">aspx, ashx, asmx</param>
<param desc="Blocked extensions (comma separated)">*</param>
</processor>
</preprocessRequest>
So that configuration will allow *.aspx, *.ashx and *.asmx to be requested directly (it's the default configuration in Sitecore 7.0).
If you're using Sitecore 6.6 or lower, the FilterUrlExtensions processor can be found in the httpRequestBegin pipeline.
If you just drop the ASPX page in at the path you'd like it to reside, by default, Sitecore should let it be served as is by going to the corresponding URL.
Just add the pages to the projects as normal (as DustinDavis suggested) but you also need to modify IgnoreUrlPrefixes in web.config (or add a config patch file) and include the pages or folders as pipe delimited values that you want the Sitecore handlers to ignore.
You can configure the value attribute of the
/configuration/sitecore/settings/setting element in web.config with
name IgnoreUrlPrefixes to prevent Sitecore from processing specific
requests, causing ASP.NET to process the request without Sitecore.
From Sitecore Presentation Component Reference
There is more information about the how and why in this blog post by Alex Ahyba
If you have sitecore open in Visual Studio, just add them in to the project. You can access the new page directly.

Using fossil embedded documents

I'm using fossil to manage some home projects and keeping notes in the wiki. After running like this for a few months, I'd like to at least try to use embedded documentation; mainly so as to be able easily to go back to previous versions.
I've studied the website page about managing project documentation which confirms that this is a technique I want to follow up, but I can't make out how to do it.
I've cut-and-pasted one of my wiki pages and added it to my fossil repo, but I can't work out where it should go in the directory structure to be accessible as described on the above page.
I've tried in a few places none of which worked. The document is currently %fossil-root%\doc\foo.wiki, (I'm on Windows), where %fossil-root% is the directory holding _ _FOSSIL__ (slighly mangled filename because of markdown), but having started a server with fossil ui, when I point my browser at http://localhost:8080/doc/foo.wiki, fossil presents me with a nicely formatted page saying it can't find index.html. I created /doc/index.html to see what would happen, but it made no difference.
Please can someone help me out, and/or point me to an example repository containing embedded documentation or another "how-to" document.
If your document is located in %fossil-root%\doc\foo.wiki, you can access it at the following URL:
http://localhost:8080/doc/trunk/doc/foo.wiki
This URL breaks down as follows:
http://localhost:8080 is the root URL to access Fossil when you run fossil ui
/doc signals that you want to access embedded documentation
/trunk indicates the checkin containing the documentation you wish to access
/doc/foo.wiki is the path of the document inside the repository
Instead of trunk, you can also specify a tag, or a branch name, or even a hexadecimal checkin identifier.
In the URL you were using, http://localhost:8080/doc/foo.wiki, foo.wiki is interpreted as the checkin name, and no document path is specified, which logically means Fossil won't find anything.
As for an example repository containing embedded documentation, the homepage of the Fossil website itself is a prime example:
https://www.fossil-scm.org/index.html/doc/trunk/www/index.wiki
where
https://www.fossil-scm.org/index.html is Fossil's root URL
/doc indicates a request for embedded documentation
/trunk indicates we want to fetch files from the trunk
/www/ is the path to the requested file inside the repository
index.wiki is the name of the file inside the repository.
So, in the 'trunk' branch of the repository, the file www/index.wiki contains the home page of the Fossil website.
You simply need to put the documentation under the %fossil-root%\www\ directory (or any other directory under version control) in your repository and then you can, for example, add the following line to your header's mainmenu section to link to it:
html "<a href='$home/doc/trunk/www/foo.wiki'>Documentation</a>\n"
As I said, it can be any directory under version control. To test this, pick any file in the repository, let's say a README file at the top level, and go to http://localhost:8080/doc/trunk/README. You should see the README file load up in your browser in a raw text format. By putting wiki or html files under a particular directory such as www you make it easy to organize the files that you specifically want rendered as documentation, which makes it easier to link to them.
http://www.fossil-scm.org/index.html/doc/trunk/www/embeddeddoc.wiki
After fossil 1.33, just prepare your document in the repository.
If the wiki file is put in
/doc/index.wiki
And use web browser to setup -> Admin -> Configuration.
There is a "Index Page" field, fill in your main index.html.
For example:
/doc/trunk/doc/index.wiki
Or if you just want the released version:
/doc/<version>/doc/index.wiki