Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Tuesday, 17 April 2012
( Orchard )

Goals:
    website demoing projects I've done over many years
        to give people ideas about what can be done easily
        to sell myself
        for it to become my 'CV'
            look at stackoverflow CV - link to it
            actual CV - link to it
       
    CMS that I can use in many places
    large codebase to explore

Examples

image

nice and simple.

| | # 
( Orchard )

image_thumb[11]

and have turned off worker process recycling in Performance too.

Trust level is set to full in web.config, and debug is set to false.

| | # 
( Orchard )

From 4 part video by Brent Arias http://www.ariasamp.net/ linked on www.orchardproject.net

image

adding in a subtitle to the minty theme

Downloading Modules – Bing Maps and Image Gallery

Adding them into the page via Widgets again:  (found that with Multiple themese installed, I had to disable other themes and only have the enabled one that I want to work).

Image Gallery

image

impressive and has nice lightbox feature.

Trying to go live – have copied the database up to live using generate scripts and this to do a complete blank of the tables:

exec sp_msforeachtable 'DROP TABLE ?'

want to exclude settings.txt when I do a deploy as it overwrites the db connection string on the live server.

image

bin\orchard

if problems then can remove stuff from here.

Content Types

image

going into Content Types, Blog

image

adding a Body part which allows us to use html

Added in a blog, and a blog post.  However only get the first 120 characters of the blog and not the whole article which is annoying.

image

Add in Designer Tools – going for a Shape Tracing feature.

image

shape tracing

Content Type

image

now can see the entire blogpost

Top Level Zones / Content Types / Local Zones

Keep changes in a theme (or ideally a new one)

No Tags

image

change footer:31 to -

No Comments

image

but this is in the Module..bad practice to edit directly.

image

Footer is the zone.

Layers

image

Creating a custom layer so that the image gallery will display only when the user is authenticated and not on home page.

Users

Add new users into Roles which are settable.  The roles just are reallly what is allowed in the back end.

If want users to see different content on the front end then look at module Quanta

Eventing / Messaging

.. eg if anyone leaves a comment then we want an email.

Book Review Widget

Content Type has Content Parts

image

content type is book review, content parts are: Body, Containable (lists) and Tags

image

have added 2 custom fields

| | # 
( Orchard )

rom VS2010 command prompt.. build “compile;package” from c:\dev\orchard\hg

then package is … but got issues with newly installed image modules

error when building and using imagegallery.

Tried disabling it on the interface and removing from front end, however it is still in the solution.

http://stefantsov.com/msbuild-and-msdeploy-for-orchard – deploying with MSBUILD

image_thumb5_thumb

used to be all files in this project folder.. now all files in project.

http://orchard.codeplex.com/discussions/350016 – Bertrand describes how he deploys using webdeploy.

http://orchard.codeplex.com/discussions/283821 – looks like it should work!

Make sure connection string settings are correct on the server, otherwise will get a 404 error!

look in Logs

DataConnectionString: Data Source=.\SQLEXPRESS;Initial Catalog=orcharddb;Persist Security Info=True;User ID=orcharddb;Password=secret

| | # 
# Monday, 16 April 2012

As I’ve got an MSDE instance running on .\ which is listening on 1433 so maybe my setup was a bit more complex than usual.

image

setup TCP/IP on the server for another port. (it had a blank port to begin with)

Open up the firewall on EC2

image

Connection string in SQL Management Studio:

| | # 
( Orchard )

I was getting nothing.  Turned out to be the connection string on the live server wasn’t right.

To see the error look in App_Data\Logs

To change connection string look in \App_Data\Sites\Default\Settings.txt

| | # 
# Saturday, 14 April 2012
( Orchard )

4 ways to install:  In summary I’ve found that WebPlatform Installer is easy..  Preferred way now is to enlist from source and use WebDeploy.

WebPlatform Installer

image

On local machine it is getting IIS7.5 express.

image

On Server2008R2 EC2 Micro and the same on server2003 – this is good as it sets up WebDeploy which I use for source code enlistment deployment.

image

it even helps with host headers etc!.. put on port 81 for testing…  and had to restart IIS.

so this actually then gives WebDeploy functionality

need to add in a firewall run… see source code below:

Webmatrix

image

Using webmatrix on local dev machine.

image

set it up using SQL CE

Source Code download from Codeplex and WebDeploy

image

Gives a sln file inside src which then compiles up fine.

publish up to a 2008R2 server on EC2

dev work needs write access to modules and themes folder..media folder needs write access

image

Server2008R2 - Webdeploy as an easy way to publish live (and only do deltas).  And this is nice as it deploys the database as SQL Server Compact 4.0

To change DB Settings easiest thing to do is delete all files in App_Data

To get SQL Server working – remember to allow SQL Authentication on the server!

Connection string I use is:

Data Source=.\;Initial Catalog=orcharddb;Persist Security Info=True;User ID=orcharddb;Password=secret
Data Source=.\SQLEXPRESS;Initial Catalog=orcharddb;Persist Security Info=True;User ID=orcharddb;Password=secret
image
Server2003 WebDeploy settings are different.
http://ec2-50-112-6-13.us-west-2.compute.amazonaws.com/MsDeployAgentService
gallery url was:
            Orchard Gallery....http://orchardproject.net/gallery/server/FeedService.svc
              now…             http://packages.orchardproject.net/FeedService.svc/

so now I can publish up to live with all built changes on local… but connection string is wrong.. Potentially overkill as would only update modules on live?

issues with going to to server2003 (when I deleted all files up there.. got 404 errors.this was actually a connection string problem.)  Way around it was to install on the server using Web Platform Installer then copy all the files into the root.

optimization: http://docs.orchardproject.net/Documentation/Optimizing-Performance-of-Orchard-with-Shared-Hosting

full trust

not debug

no app pool recycling.. I’m using separate App Pools for each web app.

OK so just stick with 2 versions for now and develop modules on local and upload to live.

Enlist in the Orchard Source via Mercurial

Had to do this to deploy to Azure.

http://docs.orchardproject.net/Documentation/Setting-up-a-source-enlistment

image

didn’t work.  https://hg01.codeplex.com/orchard

but then it did Smile

http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop

from VS2010 command prompt.. build “compile;package” from c:\dec\orchard\hg

Just use VS2010 Web Deploy now.  Had a connection string problem which was giving me a 404 error on the server.

| | # 
# Friday, 17 February 2012
( Orchard )

image

Looking at the standard theme.

Layout can be thought of as master page – define overall structure of page.

HTML5 tags like header, aside, footer, article

Script.Require("jQuery"); – possibly better would be to cdn it
Script.Include("hello.js");

Made new folder called Scripts… need to put in a web.config to say serve up as static pages.

image

seeing the branding element via jquery:

$(function () {
    $("#branding").after('<span class="hello">Hello from our script in the theme!</span>');
});

Wiring up in Layout.cshtml

    SetMeta("X-UA-Compatible", "IE=edge,chrome=1");
    Style.Include("http://fonts.googleapis.com/css?family=Lobster&subset=latin");
    Style.Include("site.css");
    Script.Require("jQuery").AtHead();
    Script.Include("hello.js").AtFoot();

image

custom.css

span.hello {
    background-color: #dddddd;
}

which does this:

image

| | # 
# Thursday, 16 February 2012
( Orchard )

To make LiveWriter work on blogging – turn on Remote Blog Publishing in Modules.

| | # 
( Orchard )

Three different prices of themes:

**need to install advanced menu?

image

SampleKit

image

Temple

image

Interface

image

Adele

image

Vinil

image

eshop

image

empower **ebst yet but not green?

image

invent

 

image

metro **2nd fave

image

wepro

 

image

dark

image

zeus

| | # 
( Azure | Orchard )

Adding a module so that it persists.

 

image

trick was to rename the package downloaded to a .zip.  Then drill into content. modules.

then follow instructions on http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure

| | # 
# Wednesday, 15 February 2012
( Azure | Orchard )

http://blog.smarx.com/posts/custom-domain-names-in-windows-azure

image

Putting in a CNAME record for davemateer.com to point to my orchard website on Azure.

| | # 
( Azure | Orchard )

Installed using Web Platform Installer, which seems to have installed it using Web Matrix

After a stop, start it worked!

image

 

Technical Initial Thoughts:

  • [did it!]Get orchard deployed to a production server
  • Get a professional website together showcasing software development, infrastructure and hardware projects done in last x years

Where to host?  Need .NET4 and SQL Server (or SQL CE).  Azure – yes

ASP.NET MVC3

NHibernate – ORM

Autofac – IoC – Orchard makes heavy use of dependency injection.

Castle Dynamic Proxy -

Proxy objects can assist in building a flexible application architecture because it allows functionality to be transparently added to code without modifying it. For example, a class could be proxied to add logging or security checking without making the code aware this functionality has been added.

For example, NHibernate, an object/relational mapper uses DynamicProxy to provide lazy loading of data without the domain model classes being aware of this functionality.

a few questions per day on Stackoverflow. eg http://stackoverflow.com/questions/9225040/how-orchard-cms-does-the-logging

Pluralsight Video

Free video for intro.. then pay for the rest

http://localhost:65422/ – using webmatrix

TinyMCE editor

Pages and Widgets

image

when editing the welcome to orchard.. it is a page.  When editing the Third Leader Aside it is a Widget.  Thie is an HTML widget.. just like a page.

image

image

but dont want the bullets

Edit The Stylesheet

image

image

no bullets on ul!

image

Ordering of Main Menu and Adding Items

image

image

Building from Source / Mercurial

downloaded source (not clone the mercurial).  This didn’t work deploying to Azure

http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure

image

getting from codeplex via mercurial

image

Had to change Azure tools version 1.5 to 1.6 on \AzurePackage.proj and in other places (but next bits didn’t seem totally necessary): http://orchard.codeplex.com/discussions/278917

Put in my storage connection string (for BLOB’s) into the ServiceConfiguration.cscfg in the VS solution.

Run ClickToBuildAzurePackage.cmd

  <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mateerstorage3;AccountKey=eYuIdHYAtX/jzkP5a67ev3ZUt1qSu0xxxxxxxxxxxxbosh419uEkJnn0Tu4jamgUiHJ1msW5K56wh7qmKVeYiVQ==" />

Upload to Azure using the manual uploader from Silverlight admin interface.

Connection string for the database

Data Source=zx6l3oinx1.database.windows.net;Initial Catalog=orcharddb;User ID=dave;Password=xxxx;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True

image

Downloaded Orchard.Azure Version from Codeplex

I actually did this first to make sure connection strings were right and to prove Orchard worked on Azure.  However did the above after so I could have full control and deploy to an extra small instance.

changed the dataconnectionstring to this:

<ConfigurationSettings>
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=mateerstorage3;AccountKey=thisisasecret==" />
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    </ConfigurationSettings>

image

should be mateerstorage3'

put in this in the connection settings:

Server=tcp:zx6l3oinx1.database.windows.net,1433;Database=orcharddb;User ID=dave@zx6l3oinx1;Password=myPassword;Trusted_Connection=False;Encrypt=True;

image

| | #