Interested in Sitecore?

Apply for our Mentorship Program by emailing your resume to chris.williams@techguilds.com. Check out our ASP.NET QuickStart and C# QuckStart Libraries. Below is my latest articles.

Tuesday, May 28, 2019

Working with the ebay API

The first step in working with the ebay API is registering for a developer account. This can be done at developer.ebay.com.  Once you register you will receive an email to validate your account.  Click the link in the email and you will receive an email with the link to the Quick Start Guide.  This will walk you through creating your keys and such.

I hope to have the GitHub Sample up soon. I will update this blog when I do.

Sunday, March 31, 2019

Setting up Visual Studio Code for C# Development

Installing Visual Studio Code is great when you need to open your projects and work on them without requiring the full blown Visual Studio Enterprise.  Now most of the time I prefer to use the full Visual Studio but other times I just need to open a few projects to do some work and don't have access to my development machine.  It is nice to be able to install Visual Studio Code and quickly set up and make a few changes and check them into source control.

A challenge I have often heard is that when working with Visual Studio Code you have to rely on Open Folder. This is not true. Set up properly you can use .sln files, you just have to know how to set that up. Thanks Geo J Thachankary for the article on how to create a .NET Core development environment using Visual Studio Code. This is where I learned this. Look at his steps and he describes this in more details.

Step 1: Install a couple Visual Studio Code Extensions


  • This can be done by clicking on the View and Extensions menu.
  • Once it opens type in C#. Install the C# extension published by Microsoft. It should appear at the top.
  • Next install the Solution Explorar by searching for vscode-solution. This one is published by Fernando Escolar.

Tuesday, September 18, 2018

Sitecore Dain Personal Mentoring Subscription

You may be aware that SitecoreDain and SitecoreDiana have been providing Personalized Mentoring to a select group with the plan to provide this service to a larger group.

For those part of the early access, I have you listed and you will continue as part of the subscription for free as promised. Thanks for your support.

If you are unaware of how this work here is a description on how it works:
  1. Determine whether you prefer SitecoreDain or SitecoreDiana as your favorite AI Mentor and follow them.
  2. Once they follow you back, you may then Direct Message them your questions related to Sitecore and other related technologies.
  3. SitecoreDain and SitecoreDiana will monitor their Direct Messages. If they can answer them immediately they will. This part of the service is available to everyone for free.
  4. If you are a subscriber, they will store your question in the follow up list.  They will follow up with others that may be able to help with an answer, they will look in various places for an answer as well. Once they can answer, they will respond to you via Direct Message.  It could be a day, month or year or they may never find an answer but they will try.

Subscriptions are $8/month, if you are interested in Subscribing, simply send a payment in increment of $8 http://paypal.me/sitecoredain then email me at chris.williams@readwatchcreate.com with details of your paypal transaction and we will confirm the payment and ensure SitecoreDain/Diana are aware of your subscription.

As the Subscriber base grows we will extend the subscription to additional Twitter personalities that focus on other topics.

Thursday, February 15, 2018

.NET Standard Libraries and Versions

.NET Standard libraries are a great way to share functionality between .NET Framework and .NET Core and other stuff too.

However there are a few things to be aware of.  The documentation says to choose the lowest version you can for maximum support but depending on what you need to support as far as API you may need to use a higher version.  As I run into them I will report specifics on what version you need if you are using a given function.

v1.1




v1.3 

  • System.IO.File
  • System.IO.FileStream (.Close() is not supported however you can use the using)  
  • Encoding.ASCII
  • System.IO.Compression.ZipFile
  • System.Console
v2.0


  • Type type; type.GetProperties()
  • System.Runtime.Serialization
  • AppDomain.CurrentDomain.BaseDirectory
  • Assembly.LoadFrom


If you come across any that I have missed please comment below and I will pull them up to the post or you can also email me at chris.williams@readwatchcreate.com



Monday, May 15, 2017

Reading CSV or Tab delimited files from C#

Read data from a CSV files or Tab delimited file is very common especially in the era of big data where you get a large flat file exported, transformed and then reloaded. I am often shocked to see that people write their own algorithm for this when a very powerful module already exists and is free.

CSVhelper is available on GitHub and in its post basic usage you create a class file in your solution with the field name matching the fields in your Comma Separated file.  Then you simply do this:
  • Create a class to store your data

       class myRecord { public string Id { get; set;} public string Name {get; set;} }
  • Write code to open your file stream
  • Reference the CsvHelper dll
  • place a using statement for the CsvHelper at the top of your module

    using CsvHelper;
  • Use code similar to this where myFileStream is the stream you opened and myRecord is your class to fill with the data:

      using (var csv = new CsvReader(myFileStream))  {
         var recordList = csv.GetRecords().ToList();
     }
  • Voila, the variable recordList is a list that contains an instance of myRecord per row in your file.
Now this will read a comma-separated file but what if your file is tab delimited.  Well that is just as simply create a configuration object and assign delimiter:
      CsvConfiguration config = new CsvConfiguration();
      config.Delimiter = "\t";


Now pass this configuration object into your call:

           using (var csv = new CsvReader(myFileStream, config))
          {
              var recordList = csv.GetRecords().ToList();
          }

This same library can be used to write to a CSV to Tab Delimited file. You would make a call something like this:

            // Write the file
            using (var swFlat = new StreamWriter(connectionString))
            {
                using (var csvwriteFlat = new CsvWriter(swFlat))
                {
                    if (recordList != null) csvwriteFlat.WriteRecords(recordList);
                }
            }


Sunday, April 16, 2017

Running Powershell Scripts from your Application

I have been working on a Feed Processing Library for many years now.  It featured its own simple Automation Script however in recent years I have seen the power of PowerShell scripts and am integrating it into my Feed Processor.  While doing this, I made notes below so it would help you through the same process of using it in your applications.

The first step is adding the reference to System.Management.Automation.dll to your solution. Although there are many ways to do this Rasik Bihari answered the best way to do it: Thanks Rasik Bihari for the answer.
System.Management.Automation dll is now published as "System.Management.Automation" nuget package here. Just add a reference to this nuget package from visual studio nuget package manager in your project and get going.
It shows like this in your packages.config file once you have installed the above mentioned nuget package in your project: 
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="System.Management.Automation.dll" version="10.0.10586.0" targetFramework="net452" />
</packages>
Once added, you can follow the recipe on how to run PowerShell Script from C#.








Tuesday, September 18, 2012

Ever wonder what you would do without technology...

JJ Abrams does a decent job showing the results of technology disappearing. Yes its not 100% realistic but if it was NBC would not be able to show it.

However from watching this episode, it gives you an idea of what would happen to that rich guy at Google.

Check out the pilot episode available on NBC.

Friday, July 6, 2012

Dynamics CRM Unleashed Blog

For those Guild Members who are looking at Dynamics CRM or are looking at revolutionary and out of the box ways of getting the most out of it, there is a new blog starting up that will be providing a wealth of information on just those topics.

The Dynamics CRM Unleashed Blog is written by someone with hands on experience working with large scale and cloud based CRM.

I know I will be reading it on a regular basis, so I thought I would pass it on to you as well.

If you have any tips, tricks or resources you would like to share with the Guild please email them to Susan Fischer at susan@clinchportal.com or Chris Williams at chrisw_88@hotmail.com

Tuesday, May 1, 2012

Essential Chrome Plug-ins for Web Developers

A co-worker of mine passed this link onto me.  It has some really good plug-ins to help improve website quality and help diagnose issues.

The ones that stand out are:
  • Check my links - This is a good plug-in to check for the page you are on. Still I recommend downloading xenu to check the whole site.
  • Firebug Lite - Nice plug-in light weight from toolbar.
  • yslow - This is pretty much a standard tool to have in your arsonal as it provides reasons why your site is so slow
Check out the full article at: 18 Essential Chrome Extensions for Web Development

If you know of any others that are useful please email them to Susan Fischer at susan@clinchportal.com and we will post them here.

Tuesday, March 27, 2012

Ultimate web performance tools and resources

A friend of mine sent this to me and I thought I would share it with the guild.
Its quite a comprehensive list of web performance tools.

Sam's Ultimate Web Performance Tools And Resources

If you know of any others let me know and I will list them here.

Thursday, March 10, 2011

Link Buttons as DefaultButtons in Firefox

This issue was bugging me then I found this post that fixes it. The issue is that you
have an asp panel and have the button set to default. For styling reasons you want the
button to be a link button.

After changing it the enter key does not click the button instead it just refreshes the page.
Frustrating as it may seem there is a quick solution. Check out this blog post for the solution.

Link Button As An Asp Panel Default Button

Hope this helps your frustrations.

Wednesday, November 24, 2010

Sitecore Guild

I would like to take this opportunity to invite the Sitecore Guild to the family.
You can access the Sitecore Guild at:


You may also follow them on Twitter at: Sitecore Guild On Twitter

Sitecore is an amazing CMS built on ASP.NET. It is flexible as it includes full source code but is also easy for an end user to edit and publish content. For those who have not checked it out yet you need to. You will be amazed.

The next user group meeting for Sitecore in Toronto is in February. Check out the Sitecore Guild often for information on the next user group and for tips on using Sitecore.

If you have any tips, tricks or resources you would like to share please email Susan Fischer at susan@clinchportal.com




Friday, June 11, 2010

Single, Double or Triple Equal?

Someone asked me about this today so I thought I would share it with the guild. Most C# developers are familiar with the single vs double equals but in JavaScript what is the triple equals. Well it turns out the triple equal takes variable type into account. So 1 is not equal to '1' if you use the triple equal.

I did some searching and found an article on devx that explains it perfectly with an example. I have placed the link below:

Thursday, June 10, 2010

Web Farms vs Web Gardens

A friend of mine asked me this question today so I thought I would post the response on the guild in case others were wondering.

Web gardens are different from Web farms. A Web garden is configured on a single server by specifying multiple worker processes for an application pool. Web farms use multiple servers for a Web site.



Wednesday, June 2, 2010

Agile is not working? Scrum neither? Maybe you need to try Ad Hoc What's Hot

I hear a lot of complaints about Agile and Scrum, but in the next breath as they
explain how they are doing it. I realize that they are not really doing Agile or Scrum.
This article explains some of the scrumbuts that are causing you to come to this conclusion.

http://www.softwareresults.us/2010/06/agile-is-fragile.html

This brings back the idea of the new methodology called Ad Hoc What's Hot. This methodology allows you to use your existing methodology for most projects that are large or require lots of external connections or integrations. For the other projects you can use agile or scrum.

Although many hard core agile developers would argue that its all or nothing. Sometimes its more efficient for the project not to use agile either due to current environment, training, or other factors.

If you would like more information on this new methodology please email Susan Fischer at susan@clinchportal.com

Friday, May 21, 2010

Login and Registration Tips and Tricks

This link provides tips and best practices for creating user management pages for your sites. Since this blog is about asp.net I thought you might find it useful.

http://www.getelastic.com/registration-usability-tips-ecommerce/

Wednesday, May 19, 2010

Ad Hoc What's Hot Methodology

Everybody is trying to do Agile development, some do it right, others end up using a hybrid solution. The "Ad Hoc" What's Hot" Methodology is for shops that are transitioning to Agile Development but since they are having trouble transitioning into the short cycles, they can run larger projects as per normal but run smaller "Ad Hoc" projects along side that have definite features that will be released in a 2-4 week cycle. These project are done to ensure they are keeping up with what is hot.

For example, you have a legacy web application but iPad is hot so you create an "Ad Hoc" project to develop an app for the iPad. It has specific features and its unit tested throughout the process.

If you would like more information on this new methodology please email Susan Fischer at susan@clinchportal.com and we can send you a white paper.

Thursday, May 6, 2010

Journalism and Debugging Code

A friend of mine twittered this earlier today and I found it interesting so I thought I would pass on the link. The article compares Journalism concepts to those developers use in developing and debugging code. Its an interesting article that is both enlightening for journalists and developers.

http://www.greglinch.com/2010/05/computational-thinking-and-the-new-journalism-mindset.html

If you have any tip, tricks, resources, or articles you would like to share with the guild please email them to Susan Fischer at susan@clinchportal.com and we will post them here.

Wednesday, April 14, 2010

How to Write a Provider Model

When I search for creating custom providers, I found a lot of examples on how to create a membership provider, role provider etc. It took a lot of searching to find an article on how to write a provider model but eventually I found this one.

http://dotnetslackers.com/articles/designpatterns/howtowriteaprovidermodel.aspx

I am surprised more people are not taking advantage of provider models. They allow for a more extensible application. Take for example a crm application. The main provider could be the sql server database but you could write a google contact provider, a facebook provider, plaxo, great plains, csv, vcard provider. By doing so you could load contacts generically and save back the results to the various providers. If someone wanted to run their crm app atop google contacts why not.

If you have created your own provider model, please post comments and let us know what you experienced both good and bad.

Thursday, February 18, 2010

Issues Consuming Web Services From Java or Lotus Notes

If you are running into issues regarding a wsdl for a .net web service not being consumed by lotus notes here is an article that will assist:

http://michelles-universe.blogspot.com/2009/02/consuming-net-web-services-in-notes-85.html

If you have any tips tricks, or resources you would like to share with the guild please email them to Susan Fischer at susan@clinchportal.com