A while back Windows introduced this concept of public networks and private networks. Basically it comes down to a question of "do I mostly trust this network?" However, it's never been totally obvious how to change this back and forth. There's lots of posts on the internet explaining how, but most are pretty complex with a lot of steps.
The most common reason to want Windows to treat the current network as a Private Network is so you can have someone connect to your machine, either share files over SMB, or connect via Remote Desktop (RDP). I hit this issue probably once a month where I can't figure out why I can't see this machine over Remote Desktop, and it's because it thinks I'm on a Public Network.
One technique is to go to Network within Windows Explorer and try to get this yellow bar to show up.
Clicking on it will give you a choice that isn't clear to Non-Technical Family Member.
No is the right answer, always. But this is a bad dialog because it looks like a Sophie's Choice.
You WANT to treat THIS NETWORK - the one you are on - as a Private Network. Select No.
A better, clearer way to change a Network to Private Network
Press the Windows Key + W to search Settings.
Type "Network Connections" and Press Enter
Click on your Network
Turn "Find PCs and Content" to ON. This Network is now a Private Network.
Don't believe me? Bring it up side by side with the Classic Network Center and watch it switch back and forth in real-time!
I hope this helps you out as much as it did me!
Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.
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.
First, here's a few great annoucments and little details that you might have missed during the BUILD Conferenceapalooza last week. Amidst all the Windows 10 and the Holograms, Microsoft also did these interesting things.
At BUILD this year Scott Hunter and Damian Edwards and I teamed up for two hours of ASP.NET 5 training. Those videos are up now at Channel 9 and we think they are pretty great. At the end you should have a good working understanding about what's going on with ASP.NET 5 and the DNX environment, as well as cross platform development and why. You'll also want to spend some time at our beta docs site (built with ReadTheDocs) here http://docs.asp.net and get involved.
One note about these videos. Be sure to download the HIGH-RES version as they include the split screen and let you see both the screen AND the people. The low-res ones will give you just the screen sharing.
Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.
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.
This week at the BUILD conference in San Francisco Microsoft released the first preview of Windows 10 IoT (Internet of Things) for Raspberry Pi 2 (as well as other lovely devices like the Intel Galileo and MinnowBoard Max).
First, as I mentioned in February the Raspberry Pi 2 runs the Windows 10 IoT version. That means there is no "shell" or Windows Explorer. It's not a tiny desktop PC, but rather the core brain of whatever embedded maker thing you choose to build with it. The core of it is Windows. You've got PowerShell, you can run Windows Universal Apps that you write in C#, and you can talk to peripherals.
Over here at http://microsoft.hackster.io there is a great list of projects you can build with Windows IoT, including a cool robot you can control with an Xbox Controller.
Installing Windows 10 on your Raspberry Pi 2
This is an early build so things will change and get easier I'm sure. To be frank, getting the builds for Raspberry Pi took some confusing on my part to download.
You'll need to install this older "File Transfer Manager" if you don't have it. If you have Chrome, you'll need to click the ".dlm" file and open it with the File Transfer Manager. You'll also need to accept two EULAs.
Then you'll get a large ZIP file with the image you want inside. Unzip somewhere.
Here's a kicker, you'll need a Windows 10 Preview machine to run these commands and install.
I built one with a laptop I had around. I'm not sure why Windows 10 is needed. However, once it's setup you can use Windows 8.1 to talk to the Pi 2 or Remote PowerShell in.
NOTE: I had some issues and got "Error 50" on one of my micro SD cards. Changing cards worked. Not sure what's up.
Now, just put your micro SD card into your Pi 2 and boot up your Pi 2 while connected to a display and Ethernet. It will initially startup very slow. It could be 2 to 4 minutes before you get to the main screen. Just hang in there until you see this screen. This is the Default app and just shows the IP Address of your Raspberry Pi 2.
Now, from your local admin PowerShell run these commands to remote into your Pi 2. The default name is MINWINPC but you can also use the IP Address.
When the credentials dialog opens, make sure you use yourrpi2machinename\Administrator or yourrpi2ipaddress\Administrator for the user name. I was just using Administrator. The default password is p@ssw0rd and you should change it.
See here how the PowerShell prompt changes to include the remote machine's name after I've remoted in?
On your Windows machine install the MSI that was included in the download. It will start a small watcher utility that will scan your network and look for Microsoft IoT devices. It's easy to lose them if their IP address changes. It also has a nice right click menu for getting to its embedded web server.
Included and running on the image is a web server that will let you explore attached devices and running processes.
You can also deploy applications from here although you'll usually do it from Visual Studio.
As of the time of this blog post they didn't have WiFi and Bluetooth ready yet but they are updating it often so I am sure we'll see updates soon. Here is a list of devices that work today via USB.
There's lots of samples. You can make Background (headless) IoT apps or do ones with a UI since the Raspberry Pi has HDMI built in.
Finally, here's turning on an LED from C# (with comments and defensive code).
using Windows.Devices.Gpio;
private void InitGPIO() { var gpio = GpioController.GetDefault();
// Show an error if there is no GPIO controller if (gpio == null) { pin = null; GpioStatus.Text = "There is no GPIO controller on this device."; return; }
pin = gpio.OpenPin(LED_PIN);
// Show an error if the pin wasn't initialized properly if (pin == null) { GpioStatus.Text = "There were problems initializing the GPIO pin."; return; }
Make sure the remote debugger is running with schtasks /run /tn StartMsVsmon and connect with no authentication while it's running.
Now you can deploy a Universal App (with UI!) directly from Visual Studio:
And here is my amazing app. Which is basically just a bunch of controls I threw onto the XAML. But still. Fancy!
Windows Remote Arduino and Virtual Arduino Shields
A few other cool maker things worth pointing out are Windows Remote Arduino and Virtual Arduino Shields. Remote Arduino lets you talk to your Arduino from your Windows machine using the Firmata protocol. Then you can reach out to an Arduino device and give it commands from a Windows Universal app. The Virtual Arduino Shields lets you use a Windows Phone as a well, just that, virtual shields. Shields for Arduino can add up and when you're prototyping you may not want to shell out for a Gyro or GPS. A cheap phone like a Lumia 530 has like $200 worth of sensors (gps, touch display, gyro, internet, speech, etc) in it that you can exploit.
It's early days but I'm pretty stoked about all the options that Makers have available. The ASP.NET team is in talks with the IoT folks to see if we can get ASP.NET 5 running on Windows IoT on a Raspberry Pi as well, so stay tuned. Get started here.
Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.
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.
What a wonderful time to be developer. I'm down here at the BUILD Conference in San Francisco and Microsoft has just launched Visual Studio Code - a code-optimized editor for Windows, Mac, and Linux and a new member of the Visual Studio Family.
Visual Studio Code (I call it VSCode, myself) is a new free developer tool. It's a code editor, but a very smart one. It's cross-platform, built with TypeScript and Electron, and runs on Windows, Mac, and Linux.
Visual Studio Code has syntax highlighting for dozens of languages, the usual suspects like CoffeeScript, Python, Ruby, Jade, Clojure, Java, C++, R, Go, makefiles, shell scripts, PowerShell, bat, xml, you get the idea. It has more than just autocomplete (everyone has that, eh?) it has real IntelliSense. It also as IntelliSense for single files like HTML, CSS, LESS, SASS, and Markdown. There's a huge array of languages that Visual Studio Code supports.
IMHO, the real power of this editor is its project IntelliSense for C#, TypeScript, JavaScript/node, JSON, etc. For example, when an ASP.NET 5 application is being edited in Visual Studio Code, the IntelliSense is provided by the open source projects Roslyn and OmniSharp. This means you get actual intelligent refactoring, navigation, and lots more. Visual Studio Code's support for TypeScript is amazing because it has JavaScript and TypeScript at its heart.
Visual Studio Code has git support, diffs, interesting extensibility models through gulp, and is is a great debugger for JavaScript and Nodejs apps. They are also working on debugging support for things like the .NET Core CLR and Mono on all platforms.
This a code-focused and code-optimized lightweight tool, not a complete IDE. There's no File | New Project or visual designers. If you live and work in the command line, you'll want to check free tool out.
Download Visual Studio Code and check the the docs to get started. Also note the docs for ASP.NET support and Node.js support. Visual Studio Code is a preview today, but it's going to move FAST. It automatically updates and will be updating in weeks, not months.
And here's some screenshots of Visual Studio Code because it's awesome. Code what you like, how you like, on what you like, and you can run it all (by the way) in Azure. ;)
Have fun!
Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.
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.
I was told by some lovely folks in the F# community that there is a nice web framework called Suave.io. Best name ever, eh? Suave is a clean, lightweight, and very F#y (pronounced F-Sharp-ie, I say) in its syntax.
Frameworks like this do well when they are easy to deploy, especially for Hello World. I always find that if a framework can quickly and easily give me a sense of accomplishment I'll be more likely to stick with it. I like to "fall into the pit of success."
I wanted to see if I could make Suave on Azure work easily as well. With the help of Steffen Forkman and the encouragement of the F# community (who have felt historically that support for F# in Visual Studio and Azure has been lacking) I put this little proof of concept together. I used the HttpPlatformHandler that is available in Azure Web Apps now by default, along with a basic Kudu Deployment Script from my Ruby/Middleman post.
Most of the F# community uses a NuGet alternative called Paket that is more F#-friendly. There's also a tiny Paket.Bootstrapper so I could curl things down, then run Paket like this, as part of an Azure Web App deployment. This script modified from Steffen:
@echo off cls
mkdir .paket REM TODO - might want to do an IF EXISTS *or* a SHA check curl https://github.com/fsprojects/Paket/releases/download/1.2.0/paket.bootstrapper.exe -L --insecure -o .paket\paket.bootstrapper.exe
.paket\paket.bootstrapper.exe prerelease if errorlevel 1 ( exit /b %errorlevel% )
.paket\paket.exe restore if errorlevel 1 ( exit /b %errorlevel% )
Then we need web.config to tell Azure Web Apps (IIS8+) to start FAKE to get F# and Suave going. Note the use of %HOME%, full paths and the %HTTP_PLATFORM_PORT%:
I added logging but it's off by default. You can use it to debug if you have issues, as the FAKE.exe output will go into a series of log files. You can then access them with the Kudu debug console.
I like running "azure site log tail YOURSITE" with the Azure Cross Platform command line. It lets me see the deployment and output as it happens.
Hopefully this is a decent clear start towards easily deploying F# Web Apps to Azure via Git, and/or the Deploy Button.
Your thoughts?
Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.
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.