Scott Hanselman

Penny Pinching in the Cloud: Your web app doesn't need 64-bit

October 6, '15 Comments [21] Posted in Azure
Sponsored By

Often times I hear folks say that they need (or want) 64-bit support when they deploy to the cloud. They'll deploy their modest application to Azure, for example, as a Web Application, then immediately go to the settings and set it to 64-bit. So many years later and it's "do I need 64-bit" is still confusing to a lot of people.

Change your Azure bitness settings here

I made basic Hello World ASP.NET app and deployed it. Now, I go to that Web Apps "blade" in the Azure Portal, click Tools, then Process Explorer (after exercising the app a little.) I'm running 32-bit here. The K is the Kudu "sidecar" deployment site (for things like Git deploy and diagnostics), and the other icon is the production site.

30 meg working set for IIS in 32 bit mode

Now, I'll swap it to 64-bit and exercise the web app again. Remember, this app is just a super basic app.

102 meg working set in IIS in 64-bit mode

See how the working set (memory) jump? It's a little extreme in a hello world example, but it's always going to be bigger than 32-bit. Always. 64-bit'll do that. Does your site need to address more than 4 gigabytes of memory from any single process? No? Then your web app probably doesn't need to be 64-bit. Don't believe me? Test it for yourself.

I'll go even further. Most web apps don't need 64-bit, but here's the real reason. If you stay 32-bit when putting your Web Application in the cloud you can fit more applications into a limited space. Maybe your Medium App Service Plan can actually be a Small and save you money.

Until 64-bit only is the default in things like Nano Server, today you can fit more Web Apps into limited memory if you stick with 32-bit.

I personally have 18 web apps in a Standard Small App Service in my personal Microsoft Azure account. They are sites like my podcast Hanselminutes and they get decent traffic. But most never get over 300-600 megs of memory and there's literally no reason for them to be 64-bit today. As such, I can fit more in the Small App Service Plan I've chosen.

18 web apps in a single app service plan

Remember that the Azure Pricing Calculator isn't totally obvious when it comes to Web Applications. It's not ~$55 per Basic Web Site. There's a Virtual Machine under there, they call the whole thing an "App Service Plan" and your Web Apps sit on top of that plan/VM. It's really $55 for a plan that supports as many web applications you can comfortably fit in there.

The cloud is a great deal when you're smart about the resources you've been given. If you're using Azure and you're not using most of the the resources in your service plan, you're possibly wasting money.

What Penny Pinching in the Cloud tips do you have? Disagree with this advice? Sound off in the comments.

Related Links


Sponsor: Thanks to my friends at Accusoft for sponsoring the feed this week. Just a few lines of code lets you add HTML5 document viewing, redaction, annotation, and more to your apps and websites. Download a free trial now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Introducing ASP.NET WebHooks Receivers - WebHooks made easy.

October 2, '15 Comments [15] Posted in ASP.NET | Open Source
Sponsored By

ASP.NET Web Hooks Receivers general architectureThere's been a lot of enthusiasm lately about the direction that ASP.NET is going lately, and rightfully so.

However, while ASP.NET 5 is cool and exciting, it's also not yet released (at the time of this writing, Beta 8 is being worked on). There are very cool things happening around ASP.NET 4.6 which is released and ready to go live today. Something else that's VERY cool that I want to explore today is ASP.NET WebHooks, which just came out as a preview and is being actively worked on.

Just as there's Web Forms, MVC, SignalR, Web API and they are all components within ASP.NET, you can think of Web Hooks as another member of the ASP.NET family of technologies. When you want it, it's there to plug in. If you don't use it, it costs you nothing in weight or runtime.

What are WebHooks?

Let's start with the What Are They part of the conversation. WebHooks are a convention. They are HTTP callbacks. Moreover, they are "user-defined HTTP callbacks." You and/or your app signs up for notification when something happens and your URL endpoint will get an HTTP POST when that thing happens. WebHooks can and should be RESTful as well. That means if you have a nice RESTful Web API then adding WebHooks to your application should not only be easy, it should a natural and clean extension.

So what? Why do we need a library for this?

Technically you don't, of course. You could theoretically implement the WebHooks pattern with an HttpHandler if you felt you had something to prove. You could more reasonably do it with ASP.NET Web API, but the general thinking is that if there's a clear and common pattern for doing something then it should be made easier and codified for correctness.

Even more, since WebHooks is such a common pattern and it's being used by folks like Dropbox, GitHub,MailChimp, PayPal, Pusher, Salesforce, Slack, Stripe, Trello, and WordPress then it'd be nice if ASP.NET came with support for these right out of the box. And it does. Support for receiving all of these and more is included.

There is also a need for easy ways for your applications to send events as WebHooks. In order to do that you need to manage and store subscriptions, and when the time comes to correctly make the callbacks to the right set of subscribers.

ASP.NET WebHooks

ASP.NET WebHooks is open source, being actively developed on GitHub and is targeting ASP.NET Web API 2 and ASP.NET MVC 5 today. It helps deal with the administrivia involved in dealing with WebHooks. It was announced on the Microsoft WebDev blog (you should subscribe) a few weeks back.

There's some great docs already being written but the most interesting bits are in the many examples.

When you install ASP.NET WebHooks you get a WebHook Handler that is the receiver to accept WebHook requests from services. Using a GitHub WebHook as an example, you can easily make a new project then publish it to Azure WebSites. GitHub WebHooks are required to use SSL for their transport which could be a barrier, but Azure WebSites using the *.azurewebsites.net domain get SSL for free. This will make your first WebHook and testing easier.

A good starter WebHook to try creating is one that gets called when an event happens on GitHub. For example, you might want a notification when someone comments on a GitHub issue as a first step in creating a GitHub bot.

The default routing structure is https://<host>/api/webhooks/incoming/<receiver> which you'll put in your GitHub repository's settings, along with a SHA256 hash or some other big secret. The secret is then put in a config setting called MS_WebHookReceiverSecret_GitHub in this example.

public class GitHubHandler : WebHookHandler
{
public override Task ExecuteAsync(string receiver, WebHookHandlerContext context)
{
string action = context.Actions.First();
JObject data = context.GetDataOrDefault<JObject>();

return Task.FromResult(true);
}
}

In this tiny example, the "action" string will contain "issues" if someone comments on an issue (meaning it's an event coming from the "issues" source).

Once you've been triggered by a WebHook callback, you can decide what to do about it. You might want to simply respond, log something, or start a more sophisticated process. There's even a way to trigger an Azure WebJob with this new extension.

More WebHooks

Sending WebHooks is similarly simple and there's already a great post on how to get started here. Finally there's even some skunkworks tooling by Brady Gaster that plugs into Visual Studio 2015 and makes things even easier.

What a lovely dialog box for making ASP.NET WebHooks even easier!

Go check out ASP.NET Web Hooks and give your feedback in the GitHub issues or directly to Henrik or Brady on Twitter!


Sponsor: Thanks to my friends and Infragistics for sponsoring the feed this week. Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Review: TP-Link AC3200 (Archer C3200) Wireless Router

September 29, '15 Comments [51] Posted in Reviews
Sponsored By

TP-Link AC3200 (Archer C3200) I've always been a Linksys or NetGear router person. I loved the legendary Linksys WRT54G and ran DD-WRT on it for years. A while back I updated my router to the Linksys WRT1900AC. This router was supposed to be the second coming of the WRT54G and promised enthusiastic support for alternate firmware. For about a year I ran the WRT1900AC with the stock firmware as there was a bit of controversy as to what that support would look like. Fast-forward a bit and it appears that Linksys and Marvel have been working together to solve some technical issues and have reached out to the OpenWRT and DD-WRT folks but unfortunately there is still no release place for DD-WRT for the WRT1900AC. I am tired of waiting and some recent instability in the stock firmware has got me shopping around.

I did some research and decided on the TP-Link AC3200 (Archer C3200). Now, before you say it, I will. This is a prosumer router. It's not cheap. But so far, it's been brilliant. I've tired $50 routers and they tip over with what I throw at them. I've got a minimum of about 20 devices on the network at a time, and often as many as 35-45. I want to be able to manage them differently, apply QoS (Quality of Service) rules, as well as segment my network. However, I am not a network engineer and I don't feel like being one. I've also had issues with range in the past but I don't feel like having two routers and one SSID. So far, it appears that this TP-Link Archer C3200 router can handle everything I throw at it.

TP-Link AC3200 (Archer C3200) 

First, let me say that this router looks like a UFO. It's a very dramatic design, but it's for a functional reason. Those are six folding antennas on the top.

router

Installation in my home took about 30 min from the moment it left the box until the whole house and every device was set up. I personally found the web interface to be simpler and more organized than any other router I've ever used, and I've used them all.

In this screenshot you can see that there are currently 18 devices connected and there are three wifi networks. I really like this feature. I've setup my own 5GHz SSID for my office, while the family gets their own 2.4GHz WiFi Network, and Netflix/Streaming/XBox devices get their own 5GHz SSID. It's nicely compartmentalized. Even more, I could optionally turn on one or more Guest Networks when folks visit from out of town. This gives guests internet, but keeps them off from seeing internal devices.

TP-Link AC3200 (Archer C3200) Wireless Router UI

If the idea of three SSIDs is too much for you, they also have a feature called "Smart Connect" which basically collapses a 2GHz and two 5GHz SSIDs and associated channels into a single Smart SSID that will abstract 802.11bgn across many channels. You get one SSID (Wireless Network Name) and the router handles the rest, automatically putting your devices on the right network given their capabilities.

There's also great Parental Controls built in, where you can set a Time Schedule per device. For example, you could make it so your child's iPad could only access the internet during certain times of the day. You would need turn off iOS Mac Address Randomization for this to work, I believe.

This TP-Link AC3200 (Archer C3200 also has some light NAS (Network Attached Storage) features that allow you to access disks via FTP, DLNA, or SMB (meaning you can talk to it via \\ROUTER\share for example). You could also even expose a disk over FTP externally if you wanted to. The router can also be a print server and make any USB printer a wireless/network attached printer which could be helpful if you've got a home office.

For the tech enthusiast/prosumer user the only nit I would say could use improvement is the Bandwidth Control (QoS) panel. It could be a little friendlier. For example, I can certainly figure out the IP Range and Port Range for Xbox Live or Netflix and set the Bandwidth rules, but since those are already pretty well understood it would be nice if there was just a dropdown or set of smart defaults. For example, we would ALL want to be able to check a box that says "make sure Netflix doesn't get slow when my spouse checks email." This dialog could be simpler.

Aside: My spouse asked me why Netflix gets slow sometimes when other people are streaming or pushing the network. I said that it's the same reason that the shower water changes temperature when someone flushes the toilet elsewhere in the house.

TP-Link AC3200 (Archer C3200) Wireless Router UI

So far I've been VERY happy with this router. Set up was a breeze, perf has been fantastic, and there hasn't been a single hiccup. I'll report back later.

Do you have this router? Or do you recommend another router? Sound off in the comments below.


Sponsor: Thanks to my friends and Infragistics for sponsoring the feed this week. Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

How to customize the Windows 10 Start Menu

September 24, '15 Comments [32] Posted in Win10
Sponsored By

It's been a few months, and pretty much everyone in my family and neighborhood has slowly upgraded to Windows 10. Some have upgraded from Windows 7 and others from Windows 8. For the most part, from a SAF (Spouse Acceptance Factor) it's been a non-issue, which is amazing, frankly.

I have been doing a few videos on Windows 10 that you can find at http://hanselman.com/windows10. I'd encourage you to share them with your friend and family or any one who's interested in being more effective with Windows! If you've still got family who are using Windows 8, my tutorials are at http://hanselman.com/windows8 but, hey, it's time to upgrade them to Windows 10.

Windows 10 has much higher SAF than Windows 8.

The first thing I recommend that everyone do once they've installed Windows 10 is to spend a few minutes customize the default experience. Out of the box you'll get a Start Menu that looks something (basically) like this.

The default Windows 10 Start Menu

This is "fine" but it's nice to customize things and make them your own.

First, you can make the Start menu wider by grabbing the right side of the menu and dragging. Grab the top and do the same thing, and make it the height and width that makes you happy. I like a 2/3s of the screen style "not a start screen but still a big menu" look, myself.

Expanding the Windows 10 Start Menu

Tiles

Pin a bunch of apps, but not just any app. I prefer apps that I use a lot, but also apps that have a pleasant Live Tile. You can right click on any app and set their tile size. Desktop Apps can be small or medium, and Windows 10 Store Apps can be small, medium, wide, or large. I like to mix it up, but that's what's nice about the Start menu, you can make it your own.

In one of my YouTube videos a person asked "how can I make these horrible live tiles ago away." Well, unpin them all. I think you're missing out, Random Internet Commenter. Another solution might be to just turn off Live Tiles. Often it's the movement folks find distracting, not the tiles themselves.

Color

Go to the start menu and type "Color." When you go into the Settings app and into Personalization | Color, you can change a bunch of stuff. I like to have the Start Menu automatically pick a color from my wallpaper, then I change my wallpaper every 30 min (more on this soon). When my wallpaper changes, my accent color changes.

Themes

The Themes Control Panel is one of the last places in Windows 10 that hasn't been updated with a new Settings page. That's a bummer because it's one of my favorite features. I hope it lives on. Themes can be downloaded by just searching for "Windows themes" or "Windows 8 themes." I like the "Best of Bing" themes that include wallpaper from popular Bing backgrounds. These themes are really RSS feeds that bring down fantastic free wallpapers.

If you combine themes with the "Automatically pick an accent color from my background" feature, you'll get a nice dynamic experience in Windows where your colors and wallpaper change as often as you'd like. I mix it up every 30 min.

image

More Folders

Another great setting that doesn't get used enough is "choose which folders appear in start." Go ahead and click the Start menu and type "choose which" to get there quickly. Remember also that your Settings menu is full searchable.

Your default Start Menu will have something like this at the bottom:

The Default Start menu in Windows 10 has few shortcuts

But once you "choose which folders appear in start" you can have useful shortcuts like these. This is a huge timesaver. Hit Start, then click and you're right in your Downloads folder.

image

Adjust the Taskbar

By default Cortana shows up as a text box at the bottom in your Taskbar. But you can change Cortana into a single button and regain more space on your Taskbar. It's up to you.

Right click in the Cortana text box and click Cortana. You can select Hidden, Show Cortana Icon, or Show Text Box.

Making Cortana smaller and getting more space in the taskbar

You can also remove the Task View button if you want as well.

Steam Tile for Games

I did a video on how amazing it is to stream a game from your Xbox One to your laptop. It really is. However, I also use Steam and I have a pretty large collection of Steam games. There's a GREAT application for Windows 8/10 called Steam Tile. If you use Steam, go get this application NOW. It's fantastic. It connects to your Steam account and gets your connection. Then it takes the art for each game and lets you Pin that game to your Start Menu.

Steam Tile makes for a VERY attractive Start Menu. The games launch into Steam, chained from Steam Tile. Steam Tile is an app that arguably fixes Steam by adding these awesome configurable and croppable live tiles.

Steam Tile is amazing

What have you done to customize your Start Menu in Windows 10? Sound off in the comments.

Related Links


Sponsor: Big thanks to the folks at Atalasoft for sponsoring the feed this week! If your project requires image viewing, format freedom, scanning, or other document-centric workflows, Atalasoft’s document imaging experts can help. Evaluate their developer tools for 30 days with remarkable human support.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Review: 3D Scanning with the HP 3D Capture Stage on the HP Sprout PC

September 21, '15 Comments [9] Posted in Reviews
Sponsored By

HP Sprout with Capture StageThe 7 year old and I have been trying to make various things with the HP Sprout (review soon) and Dremel Printer. I was sent review versions of both to explore and give feedback on. We've learned a lot and filed a lot of bugs and received lots of great software updates.

About two months ago we tried 3D scanning an object using the Intel True Sense camera and manually rotating a 3D object on the HP Sprout's touch pad. I was both impressed and unimpressed with the results. Impressed because 3D Scanning is a biscuit away from straight magic. Unimpressed because it was a tedious process and the result was a little chopped up.

But then the Spout folks sent over a "HP 3D Capture Stage" for me to try. I'll be totally honest, I thought this was going to be a cheap rotating circle, basically a Skylander's portal with a motor. I couldn't be more wrong, this thing is built like a TANK. It's actually a rotating stage split on an angle that connects via USB and allows the Sprout to angle the object between 0 and 15 degrees, however it likes. Combining this with both a 14 megapixel camera AND an Intel RealSense Depth Camera, the results are significantly better than my first attempts.

The HP 3D Capture Stage is $299 by itself, which is admittedly not an impulse purchase. The price point that I'm impressed with though is the "Sprout 3D Maker's Bundle" which includes the HP Sprout itself (no slouch with an i7 and 8 gigs, stylus, and 23" touchscreen + 20" second screen/touch mat) AND the 3D Capture Stage AND a Dremel 3D Printer all for $2999. (US$3k) That's the Sprout with the Dremel Printer and the Capture Stage is free, essentially.

ASIDE: It blows my mind that I got a loan from the bank and paid $2,800 for a 486DX/33 in 1990 and today I can get something like a Sprout AND 3D Scanner AND Printer for about the same. Seriously, Star Trek: The Next Generation is coming. Throw in an Oculus or a HoloLens and we're living in the future.

OK, first things first. Can you scan an object, get a perfect model, then 3D print the same object? Essentially photocopying/xeroxing 3D objects? No.

But you can get a VERY nice 3D model of a real physical object in just a few minutes and then export it to your favorite app for manipulation.

Here's my FIRST scan where I sat for 15 minutes and rotated a teapot 15 degrees each time the computer told me to. Not so good. And I was VERY careful and accurate, I thought.

A manually scanned 3D object

Here's the SAME teapot on the 3D Capture Stage. I used the supplied putty to gently stick the object on the stage at an angle.

Preparing a scan with the HP 3D Capture Stage

Here's a video of the start of the process. It's totally automated, but after you're done if you feel the object wasn't completely represented you can put it on its side or flip it over to get occluded sides.

A video posted by Scott Hanselman (@shanselman) on

I did scans a total of 3 times and got this auto-merged result. While the lettering got blurred after the second scan, the general structure of the teapot is 95% correct.

Teapot scanned by an HP Sprout 3D Capture Stage

I exported it into the Microsoft 3D Builder Software and got this result.

A 3D scanned Teapot using the HP Sprout 3D Capture Stage

It's also worth noting that the 3D scanned object and the textures are totally separate now, so if I wanted to make a red wooden teapot from this scan, I could.

Texture Map of the Teapot from the HP Sprout Capture Stage

Additionally, if I wanted it to be empty (like a real teapot) and have a top that could come off, I'd want to spend some time with this 3D Scan in a 3D modeling tool and actually DO THAT. ;)

The 3D Scanning Stage could be a great way for a burgeoning game designer to collect unusual objects, obtain textures and texture maps, and really jumpstart a 3D model.

3D Scanned Teapot from the HP Sprout's 3D Scanning Stage in the Dremel 3D Software

So far the whole thing has been amazing. The software has been continually updated, and while it's not perfect, it's definitely cool. My kids of been doing 2D stop-motion animation and my wife has been using it for scrapbooking.

A full review and YouTube Video is coming soon, but so far I can tell you that the HP Sprout is not just a fantastic "Kitchen PC" and a "Maker PC" but I could really see it being my family's primary computer. That said, the real place it shines is in education. I'd love it if my kids had a complete PC/scanner/printer combo available to them in their classroom.


Sponsor: Big thanks to my friends at Infragistics for sponsoring the feed last week! Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid - Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.