Sample Browser App for the All-In-One Code Framework

As I’m taking a break to wind down a bit before tonight’s adventures, I figured I should tell you guys about the Sample Browser app in the Windows Store.  (Sorry, guys – no Windows Phone app yet.)

This was the app you mentioned briefly at the end of your last post, right?

Yep!  Once you install the “Sample Browser” app from the Windows Store to your Windows 8 device, you can access the All-In-One Code repository browser data.  Here’s the opening screen:




Ooh!  Shiny! Wait… that looks similar to the app from the last post.

Very observant!  Sometimes, the Microsofties understand this concept called consistency.  It’ll work wonders here.

Okay…. let’s go on an adventure. Let’s say I want to see some ASP.NET stuff.

See that ASP.NET tile under Web Samples?  Click that tile, and you should see something like this:



There are plenty of ASP.NET code samples to peek at.  I’m going to click on the web chat program that the All-In-One Code Framework team wrote.  This will take us into the project view:



All the data… what do I see?

This details page shows a lot of details, including:

  • Name of the project
  • Link to the project
  • The ability to browse the project document
  • The ability to download the code
  • Relevant technologies
  • License
  • Visual Studio support
  • Author/last updated/ratings/download count metadata

Okay… so I clicked the Download button, as I want to have the C# sample on hand.

Did you notice that the button changed to browse?  Now, you have this helpful code browser at your finger tips.  Navigate through the C# code and check out the syntax highlighting.


You can also select code and copy it to the clipboard, much like copy and paste in a lot of Metro Windows Store apps.

What if I don’t want to download the code but want to bookmark this code for later?

Come on, now!  This is a Microsoft product, which means “bookmarks” are out and “favorites” are in!  Right click in the code area to bring up the context menu bar at the bottom.  Then, click the Add Favorite button.

Okay… I downloaded this code.  I favorited this code. I like the syntax highlighting.  But how can I easily find my downloaded code or even my favorited samples?

If you go to the search screen, you’ll notice some categories at the top, including Downloaded Samples and Favorite Samples.



You’ve shown us what happens when there are results.  What if there aren’t any results?  

These guys have a very helpful “not found” message.  Here you go:





So… how did you hear about this again?

The benefits of being an MVP and finding out cool things that we’re actually allowed to talk about!

Now, if you’re on Windows 8 – go get the Sample Browser app!

If you’re on Windows 7, see my last post on how to get their app!

Saying Goodbye to .NET Hosting…

Not only did I say goodbye to BlogEngine.NET, but I’ve also decided to cut my ties with DiscountASP.NET.  I don’t need .NET hosting for what I do and now nor do I need DiscountASP.NET, and here’s why:

  • I write blogs about what I do in technology, sometimes about .NET stuff.  When I do write about .NET stuff, I can include screenshots and videos of what I’m doing if I need you to see what I’m talking about.
  • I can also include my solution files or code files if I’m showing code.
  • Hosting files, screenshots, and videos are quite possible with a Linux host.
  • While there may be cheaper webhosts violating their Microsoft Service Provider License Agreement (SPLA) by charging ridiculously low prices, I’m also well aware of the nightmare known as Microsoft licensing and wouldn’t fall for those .NET hosts that are super cheap.
  • Linux hosting is much cheaper because there aren’t as many costs involved when it comes to licensing.  Microsoft licensing in general is confusing and can be very costly.  While I can justify the costs for some products, I can’t justify it for hosting.
  • Yes, I know that DiscountASP.NET can be pricey and that they don’t oversell their services.  I also am well aware of webhosts that will oversell their servers (much like how the airline industry oversells their flights).  While it’s a shady practice, it’s not something that isn’t known.  Subscribing with a webhost can be risky.
  • Yes, I also know how to read the fine print in webhosting contracts, and I don’t need a marketing / sales person to tell me that I should read those about webhosts being able to terminate sites that use a lot of bandwidth.  (Besides, if they pulled my logs, they’d see that my site doesn’t come close to their bigger sites.)
  • It seems bold to say that a host that uses third party automation software doesn’t know how their own backend works, but that’s what this marketing / sales guy at DiscountASP.NET told me.  Really, I would think that while they provide this service, they also may have people on staff who do know how the backends work.  They would be foolish otherwise.
  • While they’re a Microsoft Gold Partner, that really doesn’t attract me to a business.  I prefer a business that would not send a guilt trip / “the grass is not greener” email, one that would recognize the issues and realize that yes, there is competition there and sometimes the grass is greener.

Yes, I get what I pay for.  I run the risk that my webhost might oversell my server.  But I’m no longer on a server that costs an arm and a leg due to Microsoft licenses.  I’m on a server hosted by a company that I’ve been with for the past 5 years for all of my other sites.  Their support services, in addition to the existing documentation, has been great.  While others may have experienced issues with these guys, I’ve had nothing but good luck, which is why I keep my sites here and why I’ve moved here.

.NET hosting provided to be too much of a headache and too costly for me.  DiscountASP.NET’s marketing / sales guy also proved why they can be a headache.  Good riddance!

The Lucky Charms Analogy

Yesterday, I mentioned how excited I was that I could use a cereal reference to describe programming. I am lucky to be working with a dev who’s learning ASP.NET, and there are times where things that come easily for me don’t necessarily come easier for her.  The reason why I say I’m lucky in that case is because I love being able to show people new things, especially when it comes to code.  I also have realized over the years that I have a special skill of being able to explain code in simple terms.

So this week’s conversation was about using an ASP.NET repeater and accessing controls within the ItemTemplate during ItemDataBound.  It can be a tough concept to understand, so I had to find a good analogy to get the short point across.  Sure, she could’ve followed the code I had for other pages, but I’d rather have her understand why rather than blindly copy-paste-and-adapt. So here’s how our conversation went…

Her: Why can’t I access these controls?

Me: Which?  <looks at her screen> Oh… these controls in the repeater ItemTemplate?

Her: Yeah.  I know I need to do this at ItemDataBound, but I can’t see the control.

Me: Think of it like a box of Lucky Charms. Those controls are like marshmallows.

Her: <puzzled look>

Me: As a developer, we can physically see the controls in the code.  Just like when we open a box of Lucky Charms – you can see the marshmallows in the bag of cereal.

However, you can’t just take the marshmallows out of the box.  There’s the cereal bag that holds them.

Her: <following what I’m saying so far>

Me: The ItemTemplate is like that cereal bag.  Those controls are in a container and you can’t just take them out.  You need to get to them by going through the container.

So e.Item is your container.  And to find that control that you need to populate, you’d tell the container e.Item.FindControl(“name of control”).

Her: <nods, understanding my random cereal analogy>

While the cereal box analogy can’t be used for everything, it helped in this case.

ASP.NET 4 Breaking Changes

These are called breaking changes for a reason – in upgrading to ASP.NET 4, you run the chance of running into any of these things that can break your website.  I recently updated my account with DiscountASP and moved this domain to a Windows Server 2008/.NET 4 environment.  The next step was to get my TDPE stages in place, which required addressing web.config inheritance issues.  Today, I wanted to post about TDPE 2 launching… only to be greeted with the request validation errors. Um… this worked just fine, why am I seeing this now?  Oh yeah… I moved servers….

So, if you’re moving your BlogEngine blog to a .NET 4 environment fron a .NET 2 environment and have some validateRequest=”False” files, make sure that the following setting appears in your web.config:

<httpRuntime requestValidationMode=”2.0″ />

For this and other breaking changes, see the ASP.NET 4 Breaking Changes whitepaper.