Thursday, 26 March 2015

Sitecore Market Place :: Module We Blog

https://marketplace.sitecore.net/en/Modules/WeBlog.aspx

https://github.com/WeTeam/WeBlog/wiki/Sites-Running-WeBlog

http://sdn.sitecore.net/SDN5/Forum/ShowForum.aspx?ForumID=30

Tuesday, 24 March 2015

TFS Basic Series Part 1 : How to Use Label in TFS 2013

Click File --> Source Control -->Advanced --> Apply label

We need to Provide label Name , Comment, Path and version..

We can also provide label by command line


  1. Click Start, click All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt.
  2. Type cd path, where path is the directory that contains the applicable workspace.
  3. Type tf label mylabel . /r.
  4. Attaches the "mylabel" label to the workspace version of the "path" folder and all the files and folders it contains.

We can find the label by

Click File --> Source Control -->Find Label.

We can create branch whenever needed on top of given Label..

Build server automatically label for each build.

We can have multiple label applied to same version of file.

Applying label is as good as creating branch..Labelling should be done quite often while branching to be done rarely..

As a best practices branching should be done only to do patching to release.

Sources:
https://msdn.microsoft.com/en-us/library/ms181440(VS.80).aspx

Sitecore Courier Set Up

Downloaded the package using

https://marketplace.sitecore.net/en/Modules/Sitecore_Courier.aspx

Login to sitecore using Desktop Mode

Installed the Downloaded Package

Now U can access the Courier using    ~/sitecore/admin/PackageGenerationWizard.aspx

Oh I got the Error

Object reference not set to an instance of an object.


[NullReferenceException: Object reference not set to an instance of an object.]
   Sitecore.Update.Utils.ConfigurationUtils.GetConfiguration(ConfigReader reader) +207
   Sitecore.Update.Utils.ConfigurationUtils.CreateObject(String configPath, String[] parameters, ConfigReader reader) +134
   Sitecore.Update.Configuration.Factory.GetSourceDataManager() +43
   Sitecore.Courier.DiffGenerator.GetDiffCommands(String sourcePath, String targetPath) in C:\Users\Pro\Documents\My Dropbox\Courier\Sitecore.Courier\Sitecore.Courier\DIffGenerator.cs:23
   Sitecore.Courier.WebRunner.PackageGenerationWizard.Analyze_Click(Object sender, EventArgs e) in C:\Users\Pro\Documents\My Dropbox\Courier\Sitecore.Courier\Sitecore.Courier.WebRunner\PackageGenerationWizard.aspx.cs:35
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3803


The issue is that I  have not done the config setting..

 <section name="sitecorediff" type="Sitecore.Update.Configuration.ConfigReader, Sitecore.Update"/>


  <sitecorediff>
    <commandfilters>
      <filter id="changedFieldsFilter" mode="on" type="Sitecore.Update.Commands.Filters.ChangedFieldsFilter, Sitecore.Update">
        <fields hint="list">
          <field>__Created</field>
          <field>{5DD74568-4D4B-44C1-B513-0AF5F4CDA34F}</field>
          <field>__Revision</field>
          <field>__Updated</field>
          <field>__Updated by</field>
        </fields>
      </filter>
    </commandfilters>
    <dataproviders>
      <dataprovider id="filesystemmain" type="Sitecore.Update.Data.Providers.FileSystemProvider, Sitecore.Update">
        <param>$(id)</param>
      </dataprovider>
      <dataprovider id="snapshotprovider" type="Sitecore.Update.Data.Providers.SnapShotProvider, Sitecore.Update">
        <param>$(id)</param>
      </dataprovider>
    </dataproviders>

    <source type="Sitecore.Update.Data.DataManager, Sitecore.Update">
      <param>source</param>
    </source>

    <target type="Sitecore.Update.Data.DataManager, Sitecore.Update">
      <param>target</param>
    </target>
  </sitecorediff>




I was now able to analyse the changes ... But when I clicked "Download Package" I got the "

HTTP Error 404.3 - Not Found" error e"



I then added the Mime type for .update .. I dont know the correct mime type .. So I tried my luck as

.update  &  application/update..

It worked for me..

I changed some items and then serialized them in to other folder.. and then I generate the package which can be installed back on the server. 

Monday, 23 March 2015

How to: Determine Which .NET Framework Versions Are Installed

To find .NET Framework versions by viewing the registry (.NET Framework 1-4)

  1. On the Start menu, choose Run.
  2. In the Open box, enter regedit.exe.
    You must have administrative credentials to run regedit.exe.
  3. In the Registry Editor, open the following subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
    The installed versions are listed under the NDP subkey. The version number is stored in the Version entry. For the .NET Framework 4 the Version entry is under the Client or Full subkey (under NDP), or under both subkeys.

To find .NET Framework versions by viewing the registry (.NET Framework 4.5 and later)

  1. On the Start menu, choose Run.
  2. In the Open box, enter regedit.exe.
    You must have administrative credentials to run regedit.exe.
  3. In the Registry Editor, open the following subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full




Source : https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

Wednesday, 18 March 2015

Slow Cheetah Great Visual Studio Extension :: Continuous Delivery

SlowCheetah is a great Visual Studio extension that allows you to  generate different configuration files on build time for each build configuration, defining a set of transformations to a main App.config file.

This tool generate specific App.config (and Web.config) files depending on the environment (Local, Test, Production). So config files contain specific connection strings (and other stuff) for each different environment.

We can use the same for salenium and coded UI Framework to have muliple xml file for different browser.

We can create multiple project environment as per need using https://msdn.microsoft.com/en-us/library/kwybya3w.aspx


Can be downloaded from https://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5

If we dont want to install the extension we can use the Nuget for the same as well..https://www.nuget.org/packages/SlowCheetah/



Tuesday, 17 March 2015

Getting Error :: Required license is missing: Runtime Description: An unhandled exception occurred ...

Please check the  <setting name="LicenseFile" value="$(dataFolder)/license.xml" />


Data folder path should be correct.


<sc.variable name="dataFolder" value="D:\<YOUR_PATH_HERE>\Data" />

check if path is correct as well

Thursday, 12 March 2015

SEO Rules for Better Performance

·         Page should have Meta Description up to 160 characters.
·         Site should have Robot.txt
·         Site should have sitemap.xml file
·         Use hyphen (-) Rather than Underscore (_).
·         Image to have Alt text..
·         Code To Text Ratio should be more
·         Site should have favicon.
·         Static & Dynamic Compression must be enabled on load balance or IIS but not on both.
·         JavaScript and CSS files should be Minified.
·         Site should pass URL Canonicalization Test i.e. http://example.com & http://www.example.com should point to same page.
·         Url Should be in lower case

·         url should end with leading slash (/) i.e. home.com/products/                    

Monday, 9 March 2015

Claim Based Authentication Using WIF

Below Are the steps for basic claim Based Authentication 

Web.config Changes:

Add 2 section as below in web.config

  <configSections>

    <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

  </configSections>


Provide Modules Details

  <system.webServer>
    <modules>
      <add name="WSFederationAuthenticationModule" type="System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
      <add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
    </modules>

  </system.webServer>

Set the location Path

  <location path="Home.aspx">
    <system.web>
      <authorization>
        <deny users="?" />
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

Provide the Identity Provider details in

 <system.identityModel> &   <system.identityModel.services>


Code for Home.aspx

        <asp:GridView ID="ClaimsGridView" runat="server" CellPadding="3">
     

        </asp:GridView>


 System.Security.Claims.ClaimsPrincipal claimsPrincipal = Page.User as System.Security.Claims.ClaimsPrincipal;

        if (claimsPrincipal != null)
        {
            this.ClaimsGridView.DataSource = claimsPrincipal.Claims;
            this.ClaimsGridView.DataBind();

        }

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...