Archive

Posts Tagged ‘c#’

Upcoming Speaking Events

August 18, 2014 Leave a comment

I have several speaking events going on this week and next.

Tomorrow, I will speaking to the TechTalent South.  My topic will be, “Building Applications with Ubiquity in Mind”

This coming Friday, 8/22, I will be hosting and presenting the Unity 2D Workshop.  This event will be all day.

Next Tuesday, I am speaking to the Charlotte Enterprise Developers Guild.  My topic will be, “Building Line of Business Applications using AngularJS”

Hope to see you at one of these events!

Categories: English Tags: , , , , ,

.NET Uri, database not found, and encoding

I ran into an interesting issue when trying to debug some code a while back.  I had written a dynamic that would allow a person to authenticate and then pick a database in which to perform their operations.  For the most part, this system worked well and allowed me to keep things simple.  The part that was trick was that I had written my reporting and dashboard engine to use a single Razor .cshtml file to handle all requests.  It in turn pulled the report definition or dashboard definition XML files from the database.  The problem came when one of the SQL Server databases that the system was deployed was not the default instance but a “named instance“.

In my code, I would simply construct an Uri object and pass in the string that represented the parameters that I needed for the given page.  However, since a named instance uses the ‘\‘ character, this caused some problems as my simple string representation was not encoding the character and thus when the server received the request it was not a valid server name.  I spent hours thinking that it was a problem with the configuration with SQL Server.  It wasn’t until I debugged the .cshtml file that I realized that the name of the server was not coming across correctly and that I was not encoding the name properly.  Here is what I finally came up with to correct the issue:

string address = string.Format("../PreviewReturnSetupBillDesigner.cshtml?
Key={0}&ServerName={1}&DatabaseName={2}",
  101,
  HttpUtility.UrlEncode("monticello\test"),
  HttpUtility.UrlEncode("sample"));

Uri uri = new Uri(address, UriKind.RelativeOrAbsolute);

Previously, I was just passing in the server and database names without encoding them. This worked for all default installations of SQL Server but once you had a named instance in place, all bets were off.

Hopefully this will help anyone from spinning their wheels if they are doing anything similar…

Introducing Unity

February 27, 2014 1 comment

Update:  I had a great time speaking at the WNC .NET Developers Guild last week.  You can grab the slides and code below!

I had a great time speaking at the Enterprise Developers Guild last night.  We had a great turnout and I wanted to make my slides and code available to all who are interested.  You can grab the slides from here and you can either check out or download the Unity project here.

NOTE:  When you first open the project in Unity and you don’t see anything, be sure to click on the Scenes folder and double-click level1.  This will load that scene and then you should be able to play with the game as it is.

Thank you to everyone who came out…

Windows 8.1 and Visual Studio 2013

October 16, 2013 Leave a comment

I had a great time presenting at the GSP Developers Guild last night.  Thanks to everyone for letting me go a little long on the presentation!  There was so much to cover and I still didn’t show everything that is new and exciting.

Here is a link to my presentation.

Thanks to everyone for coming out….

Windows 8 – Cage Match – XAML vs. HTML

October 10, 2013 Leave a comment

I had a great time presenting with Brian Hitney over Windows 8 at the Charlotte ALT.NET user group this past Tuesday night.  We had some very good discussions concerning developing applications using XAML and HTML.

Here is a link to the slides.

Thanks to all who came out!

Mastering Ninject for Dependency Injection

October 2, 2013 2 comments

I am happy to announce that the book, Mastering Ninject for Dependency Injection has been published.  I worked on the project as a technical reviewer and had a lot of fun.

Mastering Ninject for Dependency Injection

If you are interest in a great reference for Dependency Injection (DI), this is a good one.  It goes deep for those of you who really want to take full advantage of a mature DI container.

I would like to thank Packt Publishing for reaching out to work on this title.

Game Design and Unity

September 11, 2013 3 comments

I had a great time talking Monday night on Game Design and Unity.  Here is a quick synopsis of what I covered:

 

Probably the hardest part of game development is just getting started.  We will take a look at focusing on creating your own Game Design Document.

Once we review the general concepts of our document, we will jump into a live session of building a quick app as well as using 2D Toolkit.  We will cover the following topics:

• Input: Touch and Keyboard/Controller

• Particle System

• Collision Detection

• Finite State Machines (FSM)

• Sprite Collections and Animations

• Dicing your sprite sheets

• Sprite Batching

Thank you to everyone who came out and attended!  We had a full house and that is always nice.

I also wanted to post the link to my slides documents and source code made during the talk.

Until next time…

Window 8.1 & VS2013

August 23, 2013 Leave a comment

I am happy to announce that I will be speaking with Brian Hitney covering Windows 8.1 and Visual Studio 2013.  This event is sponsored by the Charlotte Windows App Developers group.  Here is a summary of the session:

This presentation will dive into the latest changes and updates to VS2013 and Windows 8.1. Windows 8.1 will be a free update to Windows 8, and there are a number of new features to take advantage of or plan for.

Here is a link to the event for you to register for free :  Register

This should be a great in-depth session to help you get ready using Visual Studio 2013 and the free upgrade for Windows 8

Hope to see you there!

Introducing Windows 8.1 and Visual Studio 2013 Preview

August 23, 2013 Leave a comment

I am happy to announce that I will be speaking at the Enterprise Developers Guild this coming Tuesday, August 27th.  Here is a summary of my topic:

We are in some exciting times with a new version of Windows 8.1 and Visual Studio 2013 Preview announced with Build 2013 from Microsoft. Microsoft is moving towards a faster rev cycle and this makes it even more exciting to try and stay up to date with all the changes. This presentation will highlighting some of the new features and capabilities in Windows 8.1 and Visual Studio 2013 Preview.

UPDATE:  Here is a link to the slides.  Here is a link to the Windows 8.1 SDK samples.

Look forward to seeing you there!!

Developing Windows 8 – Unable to activate Windows Store app

April 16, 2013 Leave a comment

I have encountered the following error several times and I am sure that I will continue to encounter it in the future.

Unable to activate Windows Store app.  The activate request failed with error ‘This app failed to launch because of an issue with its license.  Please try again in a moment.’

Unable to activate Windows Store app

If you come across this error when you fire up Visual Studio, you may end up doing a lot of things to try to resolve the problem.  Several that come to mind are:

  • Re-starting Windows
  • Re-starting Visual Studio
  • Modifying your package manifest

None of these actually fix them problem.  It turns out that the majority of time that you encounter this problem is because you have already installed the solution into start screen.  I would recommend that anytime you encounter this error, that you always first uninstall the application from the start screen and then try to run it from Visual Studio again.

Hope this helps…

Categories: English Tags: , , , , ,