Current Topic: Microsoft

Posted by Michael Alfaro on May 14, 2013

AVG Rescue CD – A bootable CD with Antivirus to clean up your infected machine

Being a techie, I get called upon by family members to fix their computers all the time.  Today I was called in to clean up this machine that has a nasty virus, and it won’t let me even boot into safe mode.  I’ve cleaned up viruses like these in the past by disconnecting the hard drive and bringing it into my own machine to scan/remove the viruses that way.  Unfortunately once in the past, the virus from the other hard drive then infected my own machine :(  Needless to say, I’ve learned my lesson and stopped doing that.

Most of the time, I can get away with running the Microsoft Safety Scanner, but since I can’t even get to the desktop, it’s not an option.  So today I researched a bootable Antivirus CD to see if that was an option and found a great site with 26 of them:  http://www.raymond.cc/blog/13-antivirus-rescue-cds-software-compared-in-search-for-the-best-rescue-disk/

AVG

I settled on trying the AVG rescue CD and it’s finding a lot of problems on this drive!  The way it works, is you download the ISO and burn to a CD (they have USB version also).  Once you boot to that CD on the infected machine, plug in your ethernet cable and run the “Network” function to get onto the internet.  Go to the “Update” function and get the newest antivirus files which will automatically install.  Lastly scan your volume/hard drive and wait.  The CD will load the whole program in RAM, and with the updates, you’ll have the newest definitions to scan with.  It really helps you get out of jam with a nasty virus without worrying about infecting another machine or if you can’t even get to your antivirus on the desktop.  Spread the word on this, I know a lot of folks could use it!


Topics: , , ,

Posted by Michael Alfaro on April 9, 2013

Microsoft’s New Console May Require “Always On” Internet Connection

Ars Technica has reported a slew of new information regarding Microsoft’s new console, including a saucy (or rather, salty) twitter rant by one of their own with some incriminating information.

Before the initial “always on” controversy, there were previous (and in my opinion, far more likely) rumors of the next console being offered at a $500 or $300 dollars with a subscription. Even worse, there’s a rumor on top of that claiming the console will require an internet connection at all times in order to function. It seems ridiculous, but when confronted about the prospect, Microsoft Studio’s creative director Adam Orth did the exact opposite of easing people’s fears.

Microsoft has since issued an apology for Orth’s comments and Orth has since made his twitter private, but neither have commented on the claims of the “always on” console. Ars Technica has also reported that there will be a cheaper model being offered that is “just aimed at entertainment”. As opposed to being aimed at what else, torture? Making toast? As a long time Microsoft supporter in the gaming market, if these rumors become facts there is no way I will be supporting them.


Topics: , , ,

Posted by Michael Alfaro on April 7, 2013

Office 365, enable/disable the junk email filtering for all users within your organization

Found one of our employees junk filtering wasn’t working and had to open up a ticket with the Microsoft Office 365 support team (great customer service btw), and they helped me figure out where the filtering was turned off. Below is a way to do it through powershell for the whole company.

  1. Click Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell.
  2. Run the following command:
    $LiveCred = Get-Credential
  3. Run the following command:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
  4. Run the following command:
    Import-PSSession $Session
  5. Run the following command:
    Get-mailboxJunkEmailConfiguration

    ( this command can be used to see if the Junk filtering is enabled or not)

  6. To turn ON the Junk email filtering your organization :

    Get-Mailbox | Set-MailboxJunkEmailConfiguration –Enabled $True

Topics: , , ,

Posted by Lauren Ryan on March 19, 2013

.NET and Open Source Software

Jeff Atwood of the popular Coding Horror blog and co-creator of the Stack Exchange has turned away from .NET for his new open source project Discourse, and has instead turned to Ruby. It’s a bit weird to see someone who so openly loves .NET and Microsoft development build a new project with a completely different technology.  His thought was that it would be a very poor choice to develop an open source project with .NET.

He cites three main reasons:

  1. Licensing, saying “if anything kills off commercial software, let me tell you, it won’t be open source software. They needn’t bother. Commercial software will gleefully strangle itself to death on its own licensing terms.”
  2. Friction. It is much harder for anyone to just sit down and jump into development of your .NET application for the first time, because they cannot freely download all the software needed to start hacking away at it.
  3. The ecosystem. Atwood notes, “It is just not a native part of the Microsoft .NET culture to make things open source, especially not the things that suck.” There are many more libraries available to use for open source languages.

 


Topics: , , , ,

Posted by Michael Alfaro on February 25, 2013

View SQL generated by LINQ query – entity framework

Capture
So the other day I was having a touch time trying to figure out why this query wasn’t working for a client project of mine.  I started out my career programming on the SQL side of things, so my SQL skills are much higher than my LINQ skills.  After a while of trying to figure out what was wrong with this query, I wanted to view the SQL that was being generated by the LINQ query.  So off to google and once again stack overflow comes through again:  http://stackoverflow.com/questions/1412863/how-do-i-view-the-sql-generated-by-the-entity-framework

var result = from x in appEntities
             where x.id = 1
             select x;

var sql = ((System.Data.Objects.ObjectQuery)result).ToTraceString();

The .ToTraceString() was able to show me the query and allowed me to figure out that the query wasn’t the problem.  According to the 2nd most popular response, using it in the watch window will also pull it out for you.


Topics: , , ,

Posted by Michael Alfaro on February 17, 2013

Microsoft Safety Scanner – Emergency Antivirus through your browser

Doctors, Lawyers, me…. what do we all have in common?  We all work in professions that tend to be called upon by family and friends for advice about their problems.  In my case, I’m not being asked about a rash or suing someone, but rather “why is my computer so slow”.

So I wanted to share a tool of the trade that has come in handy over the years.  It’s the Microsoft Safety Scanner, a downloadable antivirus tool that runs right from your browser.  It works great on an infected machine if you’re able to get to it from the browser without the virus getting in the way.
http://www.microsoft.com/security/scanner/en-us/default.aspx

Capture

I’ve used this for a lot of machines with broken/expire or even no antivirus installed.  It’s really great when all the local tools fail to get rid of the infected files.  After getting the computer cleaned up, I tend to install the free Microsoft Security Essentials.
http://windows.microsoft.com/en-US/windows/security-essentials-download

It’s free, lightweight, auto updates and stays out of the way.  Pretty much everything you’re looking for in an antivirus tool.

Enjoy and hopefully you’ll be able to share these tools with someone you know :)


Topics: , ,

Posted by Lauren Ryan on February 12, 2013

Publishing a Local ASP.NET Web Project to Windows Azure

I recently started a trial account on Windows Azure. It turns out, using Visual Studio 2012 to publish your website to Windows Azure is extremely simple. After creating a URL for your website in the Azure portal, you need to click “Download publish profile” to grab the credentials Visual Studio will need to publish. Then in Visual Studio, in Solution Explorer, right click your project and click “Publish…” bringing up the following window.

importpublishprofile

 

Import your publish profile, and Visual Studio fills out all your connection information for you. This information can be left as is and you can publish. Now, if you navigate to your Azure URL, the website will be there.


Topics: , , , ,

Posted by Lauren Ryan on February 5, 2013

Refactoring in Visual Studio 2012: Extract Method

I’ve noticed that when I get excited and get into a groove while programming a project, I tend to get carried away and suddenly have a giant block of very unfriendly looking code. Normally, I’d go back through it and rework it by manually splitting the giant block into smaller methods that make more sense, or at the very least begin the painstaking process of documenting it as I should have in the first place.

As a lame example, here’s a simple console application written in C# that generates simple statistics on an array of integers.

simplecalc capture

This summer I discovered that Visual Studio offers a refactoring operation called Extract Method. This tool makes it extremely easy to keep code modular and thus readable and reusable. All you need to do is to highlight the code you want to extract into a method, and right click, go into the Refactor menu, and select “Extract Method”. Here you can name the method and preview the method’s signature. Visual Studio determines what needs to be returned and passed in as parameters for you.

calc median

After doing so for each calculation, I end up with more readable code. It’s hard to demonstrate how valuable this tool is with such a silly example, but it continues to help me to produce much nicer code in a much shorter time.


Topics: , , ,

Posted by Lauren Ryan on January 29, 2013

Facebook Integration with ASP.NET MVC3 Applications

Many sites that require registered users now offer the capability of users registering an account or logging in through a single click via Facebook. Facebook’s user authentication flows are based on the OAuth 2.0 protocol. FB offers its own SDK for Javascript to provide client-side functionality for this authentication process. In order to carry out this OAuth flow on the server-side, through ASP.NET/C#, we used the DotNetOpenAuth libraries.

DotNetOpenAuth LogoThese libraries also made it easy to use an OAuth dialog with other OAuth 2.0 providers, like Google. This was really advantageous, because once a flow was implemented with one service provider, it was only a matter of changing a few URLs to do the same for another.

In order to authenticate new users, our server requests an access token using DotNetOpenAuth. This access token is granted as long as our app is registered with the service provider (Facebook, Google, etc.) and we thus have a valid application ID and secret. This request also contains the information we want to know about the user. If the user gives permission, the provider returns the access token, and then we can use it to pull the requested user information (using the Facebook Graph API or the UserInfo Google API).

DotNetOpenAuth is actually now being packaged with Visual Studio 2012, and is included in all its ASP.NET project templates. Microsoft also added its own contribution to the library with its own front end to DotNetOpenAuth. Simply logging in through a large number of popular service providers is now a matter of uncommenting some code provided in each template. Playing around with the new library to do more and to integrate it with our my own custom user tables is something I’d like to do in the near future.


Topics: , , ,

Posted by Michael Alfaro on October 2, 2012

SQL 2008 SSIS Wizard cannot import text columns longer then 255 using Excel as the source

Ran into this one last week, when trying to import a large amount of data from an excel sheet into a MS SQL DB. I had some rows of data that had more than 255 characters per cells, and when the import tool would get to those rows, I’d get an error message like this:

Messages
Error 0xc020901c: Data Flow Task: There was an error with output column "English String" (18) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

After searching on google, I found a good solution here: http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/18b7ad7d-48dc-4f3b-bdab-216f461b684a/

Found a summary post about halfway down: “Ensure that one of your rows with text longer than 255 characters is within the first eight rows, OR Change the TypeGuessRows registry key to zero (so it does a full scan of all rows).”

I added a fake 1st row with all cells having over 255 character data, and it imported just fine.  Not sure why a full scan of all the data isn’t the default functionality besides to save time, but it was a good work around.

Hope you find this helpful.


Topics: , , ,