September 2015 MSDN Session at Globe–Event

Thank you PHINUG for the invitation to talk about continuous integration with Visual Studio online and Microsoft Azure.

2

Warren Yu, Microsoft MVP: Application Lifecycle Management

b

Michael Peña, MSP Alumnus currently at Avanade

5

Jerome Punsalan’s lightning intermission number to perk up while eating.

c

Me (John) Taking questions from the audiences.

4

Again thank you and see you on the next PHINUG event!

1

September 2015 MSDN Session at Globe

PHINUG celebrates only tech talks and love for the cloud if you remember the 17th night of September!

The Philippine .NET Users Group (PHINUG), Microsoft Philippines, and Globe Labs presents another installment of MSDN Sessions, a monthly series of weekday after-office hours talks for software development professionals and enthusiasts of Microsoft developer technologies.

The event will be held on will be held on Thursday, September 17, 2015, 6:00 PMto 9:00 PM at Globe Telepark Valero, which could be found at Valero St. (near VA Rufino), Makati City.

Our speakers for the next session will be:

  • John Delizo, MVP for Software Packaging, Deployment, and Servicing, is going to talk about DevOps and Continuous Delivery using Visual Studio and Microsoft Azure, and discuss about how Microsoft Azure and Visual Studio Online helps developers in increasingly automated development, testing and deployment setups.

  • Warren Yu , MVP for Application Lifecycle Management will discuss aboutLeveraging VS ALM tools in a Lean Startup Environment. Warren will discuss how to get those products out in the leanest/meanest way possible.

We also have a lightning talk:

Michael John Pena, MSP Alumnus will discuss about Portable Class Libraries.

Food and drinks will be served at the event. See you there!

 

https://phinug.doorkeeper.jp/events/31422

Containers at Microsoft Big Top Festival

SAM_3654

So me and Edison talked at Microsoft’s Big Top festival in Blue Leaf Macapagal. We shared a slot to talked about the things we are doing in the past and how it is being done in the modern world with Microsoft Azure. Edison talking about open source on Microsoft Azure.

SAM_3703

Certainly the days when we host our PHP and ASP websites with some hosting company or even in the office.

SAM_3705

Dev-Ops were different back then, right now, it’s a one line switch from one container to another container thru PowerShell.

SAM_3709

Switch production systems in seconds not days.

SAM_3712

So there, Full development, Dev-Ops, Open Source, on one platform. Good times!

SAM_3702

 

Unit Testing and CI of WCF Services

This is one of the reasons why I use WCF for all of my API projects.

There are a lot of ways to test a WCF Service Application, that we are using. I would to do a disclaimer that this may be appropriate for our use but may not for your scenarios. Moreover, what we are testing are the “functionality” of the methods exposed by the service and on tests we bypass most of WCF’s infrastructure.

The first thing you have to make sure is that the service is testable. This a default WCF implementation if you create it directly from the Visual Studio project template.

image

You wanted to create the service as an abstract class and implement it as a partial class, we do this so that we split most of our logic into multiple files and for this context, which is a unit test discussion, to not to be confused about the references. As you can see, there are 353 references to the partial class and these are all from unit tests.  From this point forward, the red class is our partial class.

image

Then you add the Service Implementation project as reference to the unit test projects. Make sure to add your Message and Data Contracts as well.

image

When you create the unit tests, you call the partial classes (in red) and then use it as it was just another class. Test it, use data source if you wish.

image

Note that this bypasses all WCF infrastructure and is only used for tests like its functionality and removing the networking component. You will also notice that you are not spawning any  IIS or host the WCF service to run test against it.

image

This now can be checked-in in TFS and do automated tests in your CI.

image

Happy CI-ing WCF Services! Smile

Windows 10 Unleashed!

UNLEASHED

Presented by Philippine Windows Users Group and Microsoft MVP’s together with Microsoft Philippines.

http://aka.ms/win10unleashed

https://www.facebook.com/events/1395572527440318/

8

This is a whole day event in Microsoft Philippines at 6750 Ayala Makati, filled with activities, talks, breakouts and side chit chats about deploying Windows 10 and applications that runs on those. We talked about services, the cloud and how it impacts how IT delivers services with those.

003

  • There’s breakout sessions about Level 300 topics and open floor discussions about Windows Deployment Services, Microsoft Deployment Toolkit and SCCM. Down and dirty demo’s in even using the next Windows Server running these roles.

311

And the Oculus on the side while eating.

9

I’d like to thank Jojo Ayson and these two MVP’s that has established and supported the Philippine Windows communities over the past years. Its nice seeing them in an event like this.

5

And Jojo on his talk, love the shirt man.

jojo

And Mae, the Windows Lead of Microsoft Philippines!

mae

Christopher Misola, he is PHIWUG from the start, now from DX of Microsoft Philippines, does a demo on Windows 10 Apps.

10

Eufer Pasion, MVP Windows Experience discussing, what else? Windows 10!

005

Yvette Watson, MVP Office 365, on Azure AD, Apps and more on Windows 10.

11

Jay Paloma, MVP Windows Experience, talking about SCCM! Oh yea!

001

PHIWUG always talks about  “experiences from the field” or sharing “notes from the field” and this is one of those.

15

Jay-r Barrios, MVP Cloud & Server Installation and Servicing, talks about Windows 10 reference images.

14

Faelmar Tanada, talking about taking your Windows To Go, enterprise stuffs in preparation for Windows-As-A-Service thingy.

1

Me and Adrian Rodriguez, MVP XBOX, talking about running the most important apps in your Windows 10. Ofcourse its Steam and Battle.net. Running Diablo III on its ultra settings on Windows 10.

games1

Civilization V on Windows 10, again on ultra settings. Oh yea. We did that.

12

And your host, haha doing Deployment thingy. Cant describe this one, you have to be there to be funny.

18

And then the Load Fest! How fast can your laptop install Windows 10 over the network or PXE?

19

This activity uses a plain vanilla WDS on a very old Cisco switch (which we borrowed found somewhere there). This is a broadcast deployment, so it should be very fair.

10406509_1010972132276661_1803858276029278253_n

And special thanks to Joel Garcia from Microsoft Philippines for the closing remarks.

16

6

Thank you! Hope to see you on our next event!

John Delizo, MVP Cloud & Server Installation and Servicing

MSDN Session @ Globe–June 2015

The Philippine .NET Users Group holds a Monthly MSDN Session at Globe Labs Valero in Ayala Makati and this June 2015 I was invited to do a quick talk about Codes, Test and Build.

 

More Photos here:

https://www.facebook.com/media/set/?set=oa.10152910565942927&type=1

https://phinug.doorkeeper.jp/events/26768


And watch out for more MSDN Sessions here:

https://www.facebook.com/groups/phinug/

https://phinug.doorkeeper.jp/

Visual Studio 2013 hangs on debug (Fixed)

Quick solution: Uncheck show all files.

I was coding for my personal project and after a few hours of debugging, VS seems to hang. I am pretty sure its not the hardware, so lets get that out of the way.

The solution contains a number of projects and folders. So to test, I created an empty solution, added the project and nada. I might be doing something wrong. Maybe VS settings? Symbols? But I already make sure that my build of VS follows my guide so its not it.

After tinkering around, setting settings gave up. So I will debug for one solution for now, its just a view change and do a build after check-in. I noticed that the icon ‘do not show all files’ is ticked, saying “who is adding files again thru solutions explorer?!”

image

Un-tick it, debug and hey! It works! Gotta try this now on the main solution.

A case of svchost.exe high CPU usage

Our developer sent me a message in our Lync Skype for Business and she told me that some of our customer apps are not responding. It seems that the back-end server (A Windows Server 2008 R2 with IIS and SQL 2012) is causing the lag. When I mean lag, I mean it is not responding. When I mean not responding, I mean it crashed.

So I asked our backend developers to check it out, they confirmed that The SQL Server process and full text died. Least of my worries, then MMC is not launching. Then you try it again and again, then this server shows everything that you opened earlier *toinks*. 

Lets just restart the server *grin* I really don’t have time for this *grin*. Server did not recover, had to ask the client to start the machine from their VM consoles. All went back to normal, well after a few hours.

Its already past 6PM and I really got a bad feeling about this. Worse, its not our server per se, its in a hosted facility somewhere, a lot of developers / groups had used this server from before and it’s the clients machine. Ouch.

Anyway, I still have to diagnose what is happening or tomorrow we have no server. I miss Azure, sigh. So opening up “MSTSC” and logging into the server:

1. First thing that you do in this situation is to open up your instrumentations, you can use task manager but I use Performance Monitor first so that I can see what is really happening to the entire server in detail . So on your run command, type PERFMON then press enter.

Go to Performance > Data Collector Sets > System > System Performance. Right click and start this baby up. Once finished you will have this report:

SVCHOSTSo as you can see, I have a busy CPU. At 100% utilization, something is running or should I say hogging the CPU of this server.

2. Now we use Task Manager:

SVCHOST2

You see a certain “SVCHOST.EXE” is running and is taking a lot of CPU from the server. Something is really odd in this server, its not using a lot of memory but look at the CPU, also check the description.

Hmmmm… The plot thickens…You can actually right click the process and then choose properties, and here is mine:

SVCHOST3

Okay so its not the real SVCHOST! I now have evidence that this is an actual malware! Copy that location, screenshot it. We will delete it later. Lets go to the details, maybe there’s more info there.

 SVCHOST4

None, so lets proceed.

3. Kill it before it lays eggs!!!

Okay, if you can stop yours great! Delete the file but mine wont die. Nothing is like good ol’fashioned manual malware killing I see.

Experience tells me I cant install an antivirus now and convenience suggest its much harder work to do it, downloading from subscription, running updates yada yada yada.

So download the Process Explorer from Technet: https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

SVCHOST5

Lets find it and check what it is doing using process explorer: Sort this list by CPU so that we know which SVC Host.

SVCHOST6

Go to the properties and navigate to each tab. On the networking “TCP/IP” tab I just found out that this connects to 77.72.133.157 and its using port 52324 and 7777. Checked it out it’s a “Cryptonyte mining pool”. I really don’t care what it is, I know its not for the use of the server so lets kill it.

SVCHOST7

Then refresh it a couple of times so that we can see if it is still there. Another tool that you can use is the commandline for tasklist.

4. To check if its still a running process using another tool, open an elevated command prompt and type tasklist /SVC /FI “IMAGENAME eq svchost.exe

SVCHOST9

Not running anymore? Run it a couple of times, just to be sure.

5. Delete it. AKA Zombie Rule #2

While it is not running, we can now delete the actual executable file. Told you you need the address / path / folder where it is. In my case its in the temp directory of the administrator. Which by the way should have been disabled thru policy, but I gotta check later, for now, we just need to delete this. In my case delete the entire temp folder. Deleting it should be our double tap.

So do a couple more checks, lets see if its still there. If not, try to restart and do a couple of checks including performance monitor. Then we can give it a good bill of health, hope I can now back to steam blizzard origin TFS. Nah who am I kidding – going back to outlook.

6. What we learned so far:

> Never install anything that is not needed in the server: Text editors, freewares, winrar, etc. If you had to edit, edit it outside of the server. If you need to zip it, use the built-in file compressor by Windows.

  • > Always turn on firewall: As you can see, if only necessary ports are opened, the malware wouldn’t be able to connect to any host.

> Never use the server for downloading: Shame on you if you do this, never, ever use the server to download anything. Even it is EF updates, no. You do this on your machine, not in the server

> Never put server outside of DMZ and in the internet: There’s a reason why we do not do this. Ever. Use hardware firewalls or internet delivery or content delivery appliances. Don’t put your server bare naked in the internet

> Harden your servers. Security is a must. Get qualified consultants if you cant do this yourself. Test your hardening, create policies.

> Never use the default “ADMINISTRATOR”: Create another administrator account and use a different less administrative account. Disable Administrator if possible.

> GPO: Always manage servers with Group Policies.

> Common Sense

 

7. Resources that we used:

MSTSC: https://technet.microsoft.com/en-us/library/cc753907.aspx

Process Monitor: https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

    > To the Systinternal Guys, up till today, I use this. Thank you.

Performance Monitor: https://technet.microsoft.com/en-us/library/cc749249.aspx

Data Collector Sets: https://technet.microsoft.com/en-us/library/cc722148.aspx

Tasklist: https://technet.microsoft.com/en-us/library/bb491010.aspx

Zombieland Rule #2 reference : http://www.zombielandrules.com/zombieland-rule-2-double-tap/