IHostedService / BackgroundService IIS 8 issue

Recently I started using the IHostedService interface for some long running jobs in my API service. Of course there are many alternatives for setting up these scheduled jobs.

I followed the instructions at https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-3.1&tabs=visual-studio, tested locally and everything was running smoothly. My job was getting kicked off every 5 mins and I can see the output in my logs and debug output.

Problems started arising when I deployed my changes to my server (admittedly this API is running on a Windows 2012 R2 server, that is way past it’s life span). This is your typical “it works on my machine” issue.

say it works on my machine one more time - Samuel L Jackson | Meme ...

My background service would only launch once and never run again! Turns out IIS has a feature called Application Initialization that needs to be installed and then adjusted in two area:


Make sure to install Application Initialization 👇

Application Pool configuration

Open up IIS manager and right click on the application pool, and then choose Advanced settings, set the start mode to AlwaysRunning.

Site configuration

And finally, right click on the website and select Manage Application -> Advanced settings, make sure to set Preload Enabled to True

Wrapping up

Make sure to perform an IISReset after making the changes, if you have any questions please feel free to contact me.

By |July 29th, 2020|Uncategorized|0 Comments

Exposing Artifacts during project build in Team City

I recently found myself in a situation where I needed to publish my artifacts to the team city’s internal nuget feed server DURING the build (not after). In order to accomplish this I had to let Team City know about my artifacts folder (or files) during the build. I simply needed to output a message. I used Team City’s Service message syntax to do this. In my build project I create another target step:

<Target Name="ExposeArtifacts" DependsOnTargets="CreateNugetPackage" AfterTargets="CreateNugetPackage">
  <Message Text="##teamcity[publishArtifacts '$(Root)\_build\Artifacts']" />


By |August 10th, 2016|Uncategorized|0 Comments

Restoring files from Synology CloudSync

After using the Synology CloudSync package to upload 250GB of ENCRYPTED data to Amazon Cloud Drive I quickly realized there was no interface to actually restore these encrypted files from CloudSync itself. After some research I found Cloud Sync Decryption tool provided by Synology.

Some more documentation on the tool can be found by clicking here.

To decrypt the files simply download the files from Amazon or whatever provide you are using, place them in a folder and run the following command:

.\SynologyCloudSyncDecryptionTool.exe -p <PASSWORD HERE> c:\temp\encrypted-files c:\temp\decrypted-files

This will decrypt all your files and place them in an output folder using the password you used to setup the cloud sync backup service.

If you have any questions feel free to contact me!

By |December 14th, 2015|Uncategorized|0 Comments

ReSharper 6 is out: JavaScript/CSS/Razor support, new refactorings, code inspections and more!

ReSharper 6 is out: JavaScript/CSS/Razor support, new refactorings, code inspections and more!

By |July 11th, 2011|Coding, Uncategorized|0 Comments

Common web design mistakes

 If you’re a small business owner, your web site is the central hub of your company, and it’s a pivotal part of your marketing and branding.

Potential customers visit your web site specifically for its content, meaning its appearance and usability are critical to its success and how those users view your company. However, getting your web design wrong can have a negative impact on your business.

Here are 5 common web design mistakes you must avoid to create a great user experience and grow your bottom line.

1. Poor Web Design Navigation

Many small businesses fail to make navigation a priority, but without careful attention to how people navigate your site, you could unintentionally be creating a frustrating experience for any potential visitor. People visit your site for specific information, and if they cannot find it they will quickly go elsewhere, leaving with the impression that your business is disorganized in more than just its website.

A good navigation structure should be seamless and will keep visitors on your site longer, which means potentially more readers, subscribers, sales or leads — whichever is your primary objective.

Website navigation affects both usability and accessibility, so it’s important to make it a primary concern. Most websites and blogs use common navigational techniques that are expected by the average visitor. The pages and sections of the site should be easy and logical for visitors to maneuver. Don’t make your visitors think about how to navigate your site; it should be effortless and natural.

There are several principles you can follow to create an effective navigation structure:

  • Use icons to aid navigation. They’re both visually appealing and easy to use and understand.
  • Create logical groups of related links, with the most important links on the top-level navigation bar and functional (dashboard, account, settings, etc.) and legal (copyright, privacy, terms) located elsewhere.
  • Provide location information so users know where they are on any given page and how to proceed to another area of the website. This can be achieved by using Breadcrumb navigation.

2. No Clear Calls To Action on a Web Page

The fundamental error of many small business web sites is the lack of a clear call to action. We’ve all seen bland small-business brochure web sites with nothing but endless descriptive paragraphs. If you aren’t leading users to commit to an action (buy a product, contact you or subscribe, for example), then you are losing them.

Driving traffic to your web site is important, but that traffic is useless if your primary call to action is a plain “click here” link buried in a sea of text. Call-to-action buttons are a great way to grab the user’s attention, and these buttons can be the key to higher conversions. Investing time and consideration into creating successful calls to action can help guide users and address their needs while achieving your own business goals.

It’s important to keep the following best practices in mind when creating an optimal call to action:

  • The design of a call to action can be broken down into 4 simple elements — size, shape, color, and position. Each plays a vital part in determining how effective the call to action is in directing the user.
  • Don’t make your users work or think, or they’ll leave. It’s not that they aren’t smart, it’s that they want access to information quickly without spending unnecessary time searching for it.
  • Don’t overdo it with multiple, competing calls to action on every page. Decide what your primary target is and then define a clear objective per page. Your content should have answered, “What’s in it for me?” and your call to action should now answer, “What do I do now?”

People visit your web site for its content, and how that is structured is a huge factor in its success or failure. Unfortunately, an overwhelming number of small businesses get so caught up in overloading the user with information that they overlook how that information is presented.

Most people do not read unless it’s absolutely necessary, and they prefer to scan through information quickly to get to the points of interest. This is why it’s so important to establish a strong visual content hierarchy so users can quickly scan your site and sifting through relevant information. A logical content hierarchy also acts as a guide through each page and creates a more enjoyable user experience.

So when focusing on your content, it’s best to keep in mind these three tips:

  • White space is possibly the most important factor to consider. It will allow the user to focus on the meaningful content within each section.
  • Break up lengthy pieces of information into digestible blocks of text, utilizing headings, sub-headings, bullets, blockquotes and paragraphs.
  • Readable content is important, so use a good line height that is large enough to make content scannable. Margins and letter spacing also need to be taken into consideration.

When talking about content, spelling and grammar cannot be underestimated.

We all know at least one small business web site that seems to include everything but the proverbial kitchen sink. Many small business owners tend to cram as much as they can onto a single page — the end result is a busy, cluttered and unreadable web page.

The more extraneous items there are on a web page, the more unprofessional it looks, and it becomes overwhelming, confusing and distracting for the user. A cluttered website will also affect traffic because visitors won’t return if they can’t understand or follow the content, which leads to low traffic, a high bounce rate and possibly a poor Page Rank.

Clutter also applies to images. Too many can be a huge distraction and just plain annoying. Images should be used to illustrate, capture attention and guide the user where required.

Follow these guidelines for a more streamlined visitor experience:

  • Challenge every item on each web page and ask, “Does it really need to be there? Does it serve a specific purpose? Can I live without it?”
  • The key is to aid the visitor in finding the information they’re looking for, so make sure to differentiate between areas of content, advertisements and promotions.
  • Prioritize your content and decide what is the most important to your visitor and potential customer — and sell it well.

Even the greatest content can become lost in a mess of words and graphics, so de-cluttering is essential.

These are just five web design mistakes that many small businesses make. What other mistakes have you noticed on small business websites?

Color & Contrast


Color and contrast aren’t usually high up on the list of priorities for a small business owner when it comes to creating a website. But it should be, because if your web site text does not have sufficient contrast compared to its background, people will have difficulty reading your content, especially people with poor vision or color-blindness.

Aside from plain readability, color and contrast are important because they can be used to create visual interest and direct the attention of the user. It can equally be effective in organizing and defining the flow and hierarchy of a page, and it’s therefore an essential principle to pay attention to during the design process. Here are some tips:

  • Using a free a Color Contrast tool (which conforms to accepted standards) you can easily check to see how the contrast on your website measures up.
  • Research how major sites use color and contrast to improve readability and highlight specific sections, and use this knowledge to experiment with color schemes.
  • One of best ways to enhance contrast is by creating size differences between elements, making some things appear larger than others. This works especially well within a minimal color scheme, and it means you don’t have to necessarily rely on color.

This post originally appeared on the American Express OPEN Forum, where Mashable regularly contributes articles about leveraging social media and technology in small business.


By |July 2nd, 2011|Coding, Uncategorized|0 Comments

Google Swiffy

Google Swiffy

By |July 2nd, 2011|Coding, Uncategorized|0 Comments

Google Web Fonts V2

New, improved, bigger, better, etc.

By |June 29th, 2011|Coding, Uncategorized|0 Comments

Solution: Explorer open each folder in same window error and SQL Management Studio, IE and Team Explorer errors

Solution: Explorer open each folder in same window error and SQL Management Studio, IE and Team Explorer errors

By |June 20th, 2011|Coding, Uncategorized|0 Comments

Why clean code is more important than efficient code

Why clean code is more important than efficient code

By |June 20th, 2011|Coding, Uncategorized|0 Comments

Web Standards Update for Microsoft Visual Studio 2010 SP1

Download the latest Web Standards Update for Microsoft Visual Studio 2010 SP1. This update integrates HTML5 and CSS3 support in Visual Studio 2010.

You can also learn about some of the new syntax for HTML5 and CSS3 by visiting any of the following links:

Until next time!

By |June 18th, 2011|Coding, Uncategorized|0 Comments