Skip to main content


Showing posts from 2016

Xamarin.Forms CarouselView

Xamarin.Forms has a nice control called CarouselView and it is very easy to add it to your Xamarin project. Below you can see the basic steps you need to follow in order to add it to your Xamarin project. Install CarouselView Nuget package to your all projects (PCL, Android, iOS and Windows) As the CarouselView is in a separate assembly, add CarouselView's namespace in root of your Xaml page and use it in your page like this;   <? xml version = " 1.0 " encoding = " UTF-8 " ?> < ContentView xmlns = " "              xmlns:x = " "              x:Class = " XYZ.Mobile.App.Controls.ValidationControls.Confirmation "              xmlns:valueconverters = " clr-namespace:XYZ.Mobile.App.ValueConverters "              xmlns:cv = " clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.CarouselView " >   < Sta

IIS Binding Fix for “The certificate associated with this binding is also assigned to another site’s binding. Deleting this binding will cause the HTTPS binding of another site to be unstable. Do you still want to continue?”

If you add a binding to your website in the IIS interface and then try to remove that binding by using the interface again, you might see the following error message that says; “ The certificate associated with this binding is also assigned to another site’s binding. Deleting this binding will cause the HTTPS binding of another site to be unstable. Do you still want to continue?” In order to fix this; follow the steps below otherwise you might end up in a big trouble; Go to C:\Windows\System32\inetsrv\config and find applicationHost.config. Save a copy of this file before making any changes. Open it using Notepad - I normally use Notepad++ but this time I had to use Notepad in order to make this work. Search for website's name in the file until you find your web site's bindings. Simply delete the binding that you no longer need and then save the file. You might need an iisreset at this point but first re-open the IIS interface and check your website's bindings. Yo

Umbraco Advanced Publishing Shortcut

To get the umbraco site cache in order, we can refresh the node XML by just typing the following url and then click on "republish" on the screen. After doing this, the website cache will be refreshed. All the published content will be updated, while unpublished content will stay unpublished. http://YOURWEBSITEDOMAIN/Umbraco/dialogs/republish.aspx?xml=true

Getting Umbraco Content - IPublishedContent vs IContent vs Node vs Document

There are couple of ways to get Umbraco content. Some returns the data from db and some does from the cache. Here is some details about them and how you use it in an umbraco project. IContent  is managed by IContentService and is targetted at back-end, read-write access to content. It's what you want to use when you need to manage content. IPublishedContent  is managed by the "content cache" and is targetted at front-end, read-only access to content. It's what you want to use when rendering content. Document  and  INode  are (roughly) the legacy equivalents of IContent and IPublishedContent. They should not be used anymore, and will eventually be obsoleted entirely. So better ignore them. Way 1 var contentService = new ContentService(); IContent content = contentService.GetById(123); Gets the content from the database. Returns both published and unpublished content. Preferred way to get editable content for CRUD operations in Umbraco 7+. Way 2 va

Cache Handler

Below is a CacheHandler that might be useful to store data in cache objects so rather than returning the data from db, we can return it from the Cache objects // CacheHanlder.cs using XYZProject.Infrastructure.Constants; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; using System.Web.Caching; using System.Web.Configuration; namespace XYZProject.Infrastructure.EventHandlers {     public static class CacheHandler     {         /// <summary>         /// Returns ExpirationMinutes from Web.config         /// </summary>         private static int ExpirationMinutes         {             get             {                 return ToInt32( WebConfigurationManager .AppSettings[ "CacheExpirationMinutes" ]);             }         }         public static object GetValue( string key)         {             return