0 Comments

Yesterday I got a new computer from IT, and they installed most of the essential tools/software for me which is good.  But when I tried to login into SQL Server, I had trouble with the login.  I spent an hour to fix it and I think it’s worth to share.

Background

Firstly, I tried to login with the “Windows Authentication account”,but failed shown me the error as below.  then I tried using “sa” account same error.

image

 

Troubleshooting

I think it might be because of the wrong password, then I emailed to IT to confirm the “sa” password. They sent me password but still the same password.  Just making sure it’s not a probably with the password, I found a tool (http://www.top-password.com/guide/reset-sql-server-password.html) to reset “sa” password.  SQL Server Password Changer is super easy to use.  All you need to do is only 3 steps really:

  • Step 1: Stop service via Sql Server Configuration Manager

image

  • Step 2:Open master.mdf filer under “C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER2014\MSSQL\DATA” Folder, and then change password

image

  • Step 3:Restart the service that we turned off in Step 1.

Unfortunately, after resetting the password, it was still the same error.  I was convinced that it’s not caused by wrong password.  Then I think it can be because of that the mix mode hasn’t been enabled. At the end,  I found a solution to enable the max mode without login to SQL.  Thanks to stackoverflow for this solution. 

Use 2 instead of 1 for mixed authentication. You'll have to restart SQL Server after changing this setting. You can't do that from T-SQL. From the command prompt, it's something like net stop mssqlserver then net start mssqlserver.

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', 
    N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 1

 

After enabling the mixed mode,  I can login with “SQL Server Authentication account” successfully, although I still don't know why the “windows account” doesn’t work.  But at least i can continue my work.

0 Comments

Sitecore Azure Module provides an integrated user interface to manage the cloud delivery infrastructure and simplify the deployment of your website to the Microsoft Azure cloud.  It would be a good start to read “Getting started with Sitecore Azure”, before you install.  It gives you an overview about what is the Sitecore Azure and why you will need Sitecore Azure, and examples about how both the content editing and content delivery environments run in the Microsoft Azure cloud etc. There are quite many guidance on getting started with using Sitecore Azure Module, but not so much how it actually working.  This article will start with the introduction of Sitecore Azure, then will talk about how it actually work in the 2nd part.  If you already know what Sitecore Azure module is and how get it installed, you can probably jump into 2nd part.

 

Why Sitecore Azure

The traditional software development deploy web application on On-Premises, which requests companies to purchase all elements of infrastructure and operating system as well as teams to maintain and deploy. with the introduce of cloud and its natural advantages – less maintenance cost and running cost, it becomes more and more adoptable and acceptable. Here is the comparison between different type of services

image

Because of this, Sitecore introduced Sitecore Azure module which allows you to deploy and manage Sitecore powered websites on Microsoft Azure utilizing PaaS deployment in a matter of minutes. With out-of-the-box functionality, deployment of web servers and SQL databases to the cloud are automated based on set optimization structures simplifying any deployment headaches.

 

How to install Sitecore Azure Module

Following the following steps to install Sitecore Azure and Deploy to Azure:

Step One

Apply Environment.xml file from http://scazureenvironments.trafficmanager.net/. It’s only taking 10 mins (initially it did take 1-2 business days to receive the Environment.xml, but nowadays they do it faster)

 

image

 

Step Two

There are two options for establishing to Azure Option A is a very fast and simple method offered by Microsoft. you can generate publishsettings from this link and then follow the instructions on the Microsoft site to get the file, then upload the file for Sitecore. Alternatively, for advanced users, you many choose Option B in which you either use an existing certificate or generate a self-certificate. Upload the .pfx for Sitecore. Once you have selected either a .publishsettings or .pfx file , you will have to provide a password for uploading to Sitecore.

 

Step Three

When deploying to azure, it allows you to monitor the real-time progress.

image

All you need to do now is to take a cup of tea and waiting for Sitecore to create all the webapp, database on Azure.

image

 

Troubleshoot

You might got 500 error after you first deploy to Azure, this is caused by oversize web.config.  For solving the error, you can update the web.cofing under AzurePackages folder by replacing Sitecore section with <sitecore configSource="App_config\Sitecore.config" />

 

References

https://doc.sitecore.net/cloud/azure/getting_started_with_sitecore_azure

0 Comments

Umbraco allows you to write a custom converter for the datatype, so as to you can use strong type object. For example the standard Umbraco Core "Content Picker" stores a nodeId as String type. However if you implement a converter it could return a IPublishedContent object.

 

What is Property Value Converter

A property value converter converts a property editor database stored value to a strong type. The converted value can be accessed from MVC Razor or any other Pulished Content API, defined by Umbraco.

How to create a custom property converter

Here is an example to convert RelatedLink value into a IList<RelatedLink> object.

RelatedLink object looks like this

image

 

Implement custom converter RelatedLinksPropertyConverter by inheriting from PropertyValueConverterBase, and IPropertyValueConverterMeta. The custom converter looks like this

image

NOTE: the custom converter need to follow name convention  [DateType]PropertyConverter

References

https://our.umbraco.org/documentation/extending/property-editors/value-converters

0 Comments

 

Since IE9, async and defer have a good support for <script> element.  And it’s really awesome and useful.

What is async & defer exactly?

image

<script async> downloads the file during HTML parsing and will pause the HTML parser to execute it when it has finished downloading.

Green is

image[7]

<script defer> downloads the file during HTML parsing and will only execute it after the parser has completed.  defer scripts are also guaranteed to execute in the order that they appear in the document.

image

 

What is the difference from the normal script element

<script>HTML will wait for the script file to be loaded and executed.

image

0 Comments

Just a week ago, I attended Sitecore training.  Thanks to Deepend, my employer, for sending me to such an amazing course. Before the training, I have been working on Sitecore for nearly 5 years.  Always questioning, whether it’s still worth to attend. The answer is for sure with following reasons:

  • Sitecore certificate is prerequisite for many advanced courses, and for some of Sitecore partners, they provide free training to certified Sitecore developers.
  • To gain the best practices from Sitecore experts.
  • Certified developer can have access to Sitecore support portal.

The training took 4 days, and at the 4th day there was a certification exam. In total, there are 40 questions. To pass the exam, a minimum score of 70% is required.  I’m really happy that I passed the exam with a score of 95%. =P

David Newwman was our trainer. He talked through all the core functions and covered a lot of areas in both business and technical areas.   The training was absolutely legend, and it is a great step forward in the future career. I highly recommend to whom are interested in becoming Sitecore developer to take the course. 

Some improvement in Sitecore 8:

  • Versioned Layout

In the previous version, Sitecore doesn’t support version layout.  layout will be shared crossing different versions.  Now Sitecore added a new field called “Final Rendering Field” which allows presentation can be bersioned like content fro each item version (either numbered or language).

image

  • Federated experience manager

FXM is an application that allows you to track visitor interactions and generate analytics information on external, non-Sitecore websites with Sitecore

  • New UX & UI with a customizable dashboard

image

Also, here are some useful links for learning Sitecore:

https://doc.sitecore.net/

https://kb.sitecore.net/

https://dev.sitecore.net/

https://community.sitecore.net/