Fix Slow Chrome Browsing

If you constantly get Site Can’t Be Reached or long wait times “Establishing Secure Connection…” while trying to browse in Chrome then this fix may resolve it. This issue not only happens to old machines but newly built computers as well after doing all the windows updates. Somewhere along the lines the Cryptographic Services windows service root registry gets corrupted. The solution to resolve this issue is to force windows to rebuild the root registry. Below are the steps you’ll need to perform (please be ware, if you delete the wrong windows registry entry, you can potentially break you windows installation disallowing you from being able to log back in after a reboot so be extra careful not to delete the wrong registry entry).

    1. Close all apps (including all instances of Chrome)
    2. Open Windows Services Management Console by pressing Windows Key + R
    3. Type services.msc then press Enter
    4. Find and stop the Cryptographic Service windows service
    5. Open the Registry Editor by pressing Windows Key + R
    6. Type regedit then press Enter
    7. Find HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates\Root\ProtectedRoots
    8. Right click ProtectedRoots > click Permissions if you get the following windows security message then the registry entry is corrupted.
    9. Click Reorder then click OK
    10. Delete the corrupt registry entry: HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates\Root 
    11. Now we need to restart the Cryptogrphic Services windows service
    12. Press Windows Key + R then type services.msc then press Enter
    13. Find and start the Cryptographic Service windows service
    14. Open Chrome and browse to a secure website (e.g. you can use www.YouTube.com)

That’s it folks, you should be all set and ready to browse without any delays. If your browser still takes really long to load secure web pages, you may have a virus on your computer but this is out of the scope of this article.

I hope this helps someone out there, happy browsing all! 🙂

Tutorial 2 – AngularJS Demo App

Please Note: If you are starting a new web project, you should take a look at using the new Angular (currently at version 7 at time of writing). If you are looking for AngularJS specifically, continue reading below.

The following is a demo AngularJS (Angular 1) app I built in Visual Studio 2017. It demonstrates how to use core concepts in AngularJS such as interpolation, two-way data binding, and routing (via UI Router). It also uses some HTML5/CSS3 concepts such as Local Storage and CSS Class Selectors. Using the basic concepts illustrated in this demo web application, you will have a good foundation for building a real-world applications.

To download the angular demo project, please click the link below:

In order to run this demo web application, Visual Studio 2017 is required (it may work on other version but I have not tested). To get your free copy of Visual Studio 2017 Community Editionclick here to visit their download page.

Below is a video where I demonstrate what the GUI will look like when you run the Tutorial 2 – AngularJS Demo web app:

Runnable (F5) .NET Windows Service

If you’re looking for a Windows Service solutions that you can run and debug utilizing the F5 key on your keyboard then you’ve come to the right place. If you are anything like me, when you’ve worked with Windows Services you have experienced the pain of running and debugging the OOTB windows service project. You have to build your app, then install it, start it from the Service MMC, then attach the process (who wants to do that? way too many steps if you ask me).

Below is a link to a Zip file containing Visual Studio project that I have been using for some time now as a starter when I build new Windows Services. It allows you to run the application using the Run and/or F5 key to debug and is windows service ready when you want to deploy it as a service.

I will be following up this blog with a YouTube video that demonstrates how to use it. If anyone has any questions, please comment on the video and I will get back to you as soon as I can.

 

HTML 5 Video Game (VS.NET 2012 & Chrome)

Hello everyone,

A while back, I decided I wanted to learn how utilize HTML 5 graphics so I built a simple video game. I started out using graphics I found on the internet of Super Mario and Luigi (hence why the title in the video shows “Super Flappy Guys”) but later drew my own sprites (images). The video below shows the game in action with the graphics I created (I’m no artist) using GIMP opensource:

 

Cherwell Global Conference 2016 (#CGC2016)

Last week, I (and three other colleagues) had the opportunity to attended the Cherwell Global Conference 2016 event in Colorado Springs at The Broadmoor resort. It was the first time attending this event so we didn’t know what to expect but we had a great time and learned a lot.

Although, I haven’t had much experience with Cherwell, attending the CGC2016 really made me super excited to learn more about it. I really got the “Apple” vibe during the event (especially during the KeyNote).

Overall, I think Cherwell delivered, the event was impressive. For the Cherwellians that helped make the event possible, you guys did a great job!

Shout out to the following training PROs for providing a great class experience with tons of good information:  

  • Mike McMullen
  • Brian Schoner
  • Kevin Kraus

WCF – An existing connection was forcibly closed by the remote host

If you’ve run in to the following error message in your WCF service:

System.ServiceModel.CommunicationException:    An error occurred while receiving the HTTP response to https://YourDomain.com/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

You most likely already spent many hours trying to debug the exception. This happen to me and I searched Google and read through tons of threads, most about updating the following attributes in Web.Config/App.Config on the Server/Client:

  • maxReceivedMessageSize
  • maxStringContentLength
  • maxBufferSize
  • maxArrayLength
  • maxBytesPerRead
  • maxDepth

Others recommended enabling tracing on the client and on the server. None of these suggestions helped me… So I sat and banged my head against the wall for a few more hours and thought “What was different about this particular service method as compared to my other methods in my WCF service?“.

It turns out, my issues was actually really simple to resolve but the error message had nothing to do with the actual issue at hand. All the methods in my WCF service return custom entities (classes) and in this particular method one of the properties was of type DataTable.

The issue all along was that I wasn’t giving the DataTable a Name.

DataTable dt = new DataTable(“TheName”);

I hope this helps you guys save sometime.

Happy coding! 🙂

SSRS Export RDL to a File from Report Server

I’ve been getting a lot of requests lately for help with exporting a report to a file in SQL Server Reporting Service (SSRS). The focus of this tutorial will be to show you guys how you can export a report from your Report Server.

Please note, this tutorial will not show you how to export an RDLC (client-side) report.

The first thing we need to do is setup up our Visual Studio .NET project:

  1. Download ReportHelper zip and extract the wrapper C# class ReportHelper.cs into your project.
  2. You will need to add a service reference to your Report Server execution web service (e.g. http://YourServerName/ReportServer/ReportExecution2005.asmx).
  3. Alternatively, you can use the VS.NET WSDL tool to extract a C# proxy class and add that to your project (I’ll provide instructions on how to do this further down).

Once you’re all setup, create a new VS.NET MVC or Web Forms project.

MVC:  Create the following action method in your HomeController:

public FileContentResult ExportReport()
{

var @params = new List<ReportingServices.ParameterValue>();
@params.Add(new ReportingServices.ParameterValue() { Name = “ParameterName”, Value = “YourValue”});

var report = new NunoSolutions.Report();
report.ReportServerUrl = “http://YourServer/ReportServer”;
report.ReportPath = “/Home/Report1”; // This is the report server path to your report
report.ExportParameters = @params.ToArray(); // can be excluded if your report doesn’t have parameters
report.ReportTitle = “Your Report Name”;
report.ReportFormat = “Excel”;
return NunoSolutions.ReportHelper.ExportMVC(report);

}

WebForms:  Create new button called “Button1” and connect the “Click” event to the following method:

protected void Button1_Click(object sender, EventArgs e)
{

var @params = new List<ReportingServices.ParameterValue>();
@params.Add(new ReportingServices.ParameterValue() { Name = “ParameterName”, Value = “YourValue”});

var report = new NunoSolutions.Report();
report.ReportServerUrl = “http://YourServer/ReportServer”;
report.ReportPath = “/Home/Report1”; // This is the report server path to your report
report.ExportParameters = @params.ToArray(); // can be excluded if your report doesn’t have parameters
report.ReportTitle = “Your Report Name”;
report.ReportFormat = “Excel”;
NunoSolutions.ReportHelper.Export(report);

}

You’re done, go ahead and run your project. If you configured everything correctly, your report should get exported to Excel format.

Here’s how you can generate the SSRS proxy class:

  1. Open VS.NET Command Prompt
  2. Enter CD  C:\Temp  and press enter (this will be the location where the proxy file will be created)
  3. Execute the following command to generate the SSRS proxy class (make sure you change the report server name to your server’s name): wsdl /out:ReportExecutionService.cs http://YourReportServerName/ReportServer/ReportExecution2005.asmx?WSDL
  4. In Visual Studio, add C:\Temp\ReportExecutionService.cs file to your project

Click Here for more information on how to export a C# Proxy class using Microsoft’s WSDL utility.

 

Windows 8.1 – Network Connectivity & new Start Button

Microsoft finally added the Start button to Windows 8.1 and I finally installed it.

Network Connectivity

After upgrading to Windows 8.1, I struggled with the Wi-Fi Network connectivity. In the Wi-Fi popup screen (click the Wi-Fi icon in the task bar) kept saying limited network connectivity with the little exclamation mark next to the Wi-Fi connection. It took me a while but I finally resolved the issue by opening Device Manager and uninstalling the Wi-Fi network drivers and then reinstalling them (reinstalling the drivers without uninstalling them from Device Manager first did not work for me).

Again, as I’ve said in the past, I really like Windows 8, this is not a bashing session. However, at the same time there are certain things about Windows 8/8.1 that just make me wonder “Why?”:

Pros & Cons IMO

1st, things I like about Windows 8.1:

1. I have a duel screen setup and my main screen is on the right side. I like that I no longer have to aim my mouse just perfectly at the bottom left edge of the main screen just to go to access the start screen because MS finally added a start button (I have issues with the start button too but more on that in the next section).

2. I like the new options and customization that you get from the metro GUIs.

3. The computer management menu where you previously had to right click the bottom most left edge of the screen now contains shutdown options (shutdown, sleep, hibernate, etc…) 

2nd, things I do not like about Windows 8.1:

1. In order to view the computer management (right click) menu, you have to right click the start button… it would have mad a lot more sense  if you just left click the start button and the menu appears.

2. The computer management (right click) popup menu is so plain and ugly… just seems like MS rushed to add it and didn’t spend anytime on it. MS should have invested just a little bit of time to make it look more integrated and pretty (similar to the Windows 7 popup menu without the “All Programs” menu & recent programs)

3. Start button brings you directly to the start screen instead of popping up a menu. I don’t understand why the start button simply brings up the start screen if there are many other methods to achieve the same thing:

  • Press the Windows Key on the keyboard
  • If the PC is a tablet (like a surface) just press the start button on the screen itself
  • Bring up the Charms > Start button

This is how the start button should work:

  • Double clicking should bring up the Start Screen
  • Single clicking should popup the computer management menu

Anyway, this is my two cents, thanks for reading.

-Nuno

Windows 8 Settings Gear Box Icon

I have to say, Windows 8 is really a great product but what would make it even better would be a Settings icon somewhere on the taskbar. Once you’ve used it for a few weeks and really get used to it, it starts growing on you. At home I only use Windows 8 but at the office we still use Windows 7 and Windows XP. This week for the first time I found myself sitting at my desk pressing the Windows Key trying to bring up my Start Screen and thinking to myself “wow, I totally forgot I’m on Windows 7, Duh!”.

I’ve seen a lot of threads with people complaining about Windows 8 mainly because of the missing start button and number of clicks it takes just to shutdown their PC. Anyway, this article isn’t to talk about how many click or taps it takes to do something rather it is a suggestion for Microsoft that I think would make a huge difference in the user experience. Most people I’ve spoke with don’t really care about the start button menu rather they want a quick way to access certain Windows Features. For example, there should be a way to enabled an icon or button somewhere on the taskbar that provides quick and easy  access to Power features, Control Panel, Search, and Administrative Tools (for the techy folk). The hidden menu at the bottom left hand corner of the screen just doesn’t cut it. This is especially true if you have dual monitors where the right monitor is your main and the left is your secondary. This is my setup and the mouse seems to always want to move over to my second screen so I have difficulty accessing the hidden menu… its such pain in that you know what. 

Here’s what I think would be a perfect solution to this problem. Add a Gear Box Icon to the bottom left of the screen where the old START button used to be and show a cut down version of the Start Menu. For example, here’s a mockup screenshot of what I think that menu should contain. We don’t need the program list or recent programs list on this menu. I really think this would improve the Windows 8 experience and also stop most of the commotion all over the internet relating to the start button.

 

Holla back if you agree,

Nuno

Start Button App v1.1 for Windows 8

I’ve been using Windows 8 since the Consumer Preview and have really grew to love it. I’ve seen a lot of posts about people wish they could still have their start button in windows 8. Below is a freeware app I wrote for myself in .NET 4.5 that will provide similar functionality.


Here’s how you install it:

1.    Download the StartButtonApp_v1_1.7z files below and extract it to your desktop

2.    The zip program should create a directory called StartButtonApp and in that directory there should be a StartButtonApp.exe file

3.    Right click the StartButtonApp.exe and click Pin to Taskbar

4.    Move the StartButtonApp icon to the desired location on your taskbar and you should be all set

 

[EDIT: NunoP]

A newer version of the Start Button App was posted that allows users to customize the menuitems that get displayed. To modify the menuitems, simply open the menu.xml file and modify it as per your requirements.

Here’s what the default menu.xml file looks like:

<MainMenu>

<MenuItem

name=Administrative Tools

command=control.exe

arguments=admintools

position=1 />

<MenuItem

name=Control Panel

command=control.exe

arguments=“”

position=2>

<MenuItem

name=Add/Remove Programs

command=rundll32.exe

arguments=shell32.dll,Control_RunDLL appwiz.cpl,,0

position=1 />

<MenuItem

name=Display Properties

command=rundll32.exe

arguments=shell32.dll,Control_RunDLL desk.cpl,,3

position=2/>

<MenuItem

name=Mouse Properties

command=rundll32.exe

arguments=shell32.dll,Control_RunDLL main.cpl,,0

position=3/>

<MenuItem

name=Power Options

command=rundll32.exe

arguments=shell32.dll,Control_RunDLL powercfg.cpl

position=4/>

<MenuItem

name=System Properties

command=rundll32.exe

arguments=shell32.dll,Control_RunDLL Sysdm.cpl

position=5/>

<MenuItem

name=Device Manager

command=rundll32.exe

arguments=devmgr.dll DeviceManager_Execute

position=6/>

</MenuItem>

<MenuItem

name=Shutdown

position=3>

<MenuItem

name=Shutdown

command=shutdown.exe

arguments=-s -t 00

position=1 />

<MenuItem

name=Restart

command=shutdown.exe

arguments=-r -t 01

position=2/>

<MenuItem

name=Log Off

command=shutdown.exe

arguments=-l -f

position=3/>

</MenuItem>

</MainMenu>

To add HIBERNATE and SLEEP, simply add the following two line of code underneath the Log Off element to the menu.xml file:

<MenuItem

name=Hibernate

command=rundll32.exe

arguments=PowrProf.dll,SetSuspendState

position=4/>

<MenuItem

name=Sleep

command=rundll32.exe

arguments=powrprof.dll,SetSuspendState 0,1,0

position=5/>

 

·      Now runs on top of .NET 3.5 (instead of 4.5)

·      The menu is now customizable via an XML file 

The StartButtonApp app is totally free so enjoy.

Nuno F. Pereira