Top 5: Google Makes People Dumb

Number 5: “My neighbor is …”

This is not really dumb but funny. People tend to have a “good” impression about their neighbors.

google_dumb_5

Read the rest of this entry »

I.R. Certified

I finally got it, my first Microsoft certification. Yesterday I went to Bucharest, Romania to take the 70-536 Microsoft .NET Framework – Application Development Foundation exam.

It was an interesting experience because of the train which was 30 late. Got to Bucharest later than expected and I had to (almost) run to the exam center -  got there 1-2 minutes before the exam start.

The exam itself was a little different than what I was expecting (from the practice tests). I had 40 questions instead on 45 (why?) and there were a lot of .NET globalization questions. I would rate it as medium to hard but the time was more than enough and I was able to recheck my questions 3 times and still got out of the room with 50 minutes before deadline.

After the exam I took a walk through Bucharest and took some pictures. That city is so green (compared to Brasov)…

img_3184 img_3187 img_3192 img_3198

Guess what? When returning the train, again, was late. Just this time there was almost an hour.

NOTE: I.R. stands for “I are” (see the animated TV series “I Am Weasel”).

Software + Services. A Modern Approach. Part 1

Part 1 – Intro

Part 2 (The Idea) >

Contents:

  1. What is Software + Services
  2. Azure Services Platform
  3. Live Mesh

1. What is Software + Services

Over the past decade, the world we live in has been transformed by the Web. More and more people gain Internet access, services become more accessible  and the experience is improving. There are a lot of advantages of using Internet services:

  • Low hardware requirements: services use the resources provided by the vendor and not the local ones. We only need devices capable of displaying the information that the service is sending. Most of the time no processing is done locally.
  • Device independence: a service can be accessed from any device connected the Internet. It does not require special privileges on the local machine and no installation is required.
  • No maintenance: services are maintained and updated by the service provider, the client must do nothing to configure it. The service is an out of the box solution.
  • Flexibility: we can change the service provider whenever we want. This capability creates new opportunities for businesses that can dynamically swap services and choose the one that matches their needs.

However there are still some limitations for which running local software is preferred instead of a web application/service:

  • User experience: browsers are not yet capable of delivering the same user experience as a local running application.
  • Privacy: there are situations when a company chooses the keep all its data within its controlled/trusted borders. There are many privacy concerns when using 3rd party services because there is no control over the security and must rely on the provider’s security. Some complex federation problems might occur.
  • Offline experience: even though the Internet is now available most of the time there are still situation when network access is not available (maybe some technical problems) and the service  cannot be accessed.

What do we do when we want to power of local running applications and the flexibility and ease-of-use of the Internet services? Simple: we take the best part of each, create an architecture that combines them and use it for application that work both online and offline. Ray Ozzie (Microsoft Chief Software Architect) mentioned that “when you combine the ever-growing power of devices and the increasing ubiquity of the Web, you come up with a sum that is greater than its parts. … Software-plus-Services is the next logical step in the evolution of computing.  It represents an industry shift toward a design approach that is neither exclusively software-centric nor browser-centric” [1].

Read the rest of this entry »

The importance of backup

I usually backup my Outlook datafiles a couple times a month. Today I was preparing to backup delete them.

I have some remote locations where I save them and the process goes like this (bad order!)

  1. Delete the old backup
  2. Clean the backup source (delete if anything is unnecessary)
  3. Do backup

Well… step 2 is a bad idea!

I had a “feeds.pst” file which should be deleted. Done that but the feeds file was still there. That was the moment when I realized that I’ve done someting bad. What I did was to delete the “Archives.pst” file, the file that contains the archive of my mails older than 6 months.

I immediately turned off the computer, inserted the Hiren BootCD and started the file recovery utility. I recovered the file but Outlook said that the file is corrupted (Damn!), repaired the file but only some mails could be recovered :(

Luckily I  have a backup just one week old on one of the servers from work. Will take that on Monday and hope I didn’t archived the mails this week (can’t remember).

However, in all this it is a good thing. I’ve found out that Outlook has an utility called SCANPST (“c:\Program Files (x86)\Microsoft Office\Office12\SCANPST.EXE”) that can check and repair pst files.

NOTES TO SELF:

  • Shift+Delete is a bad combination. Use Delete instead.
  • Recycle Bin is not evil.
  • The word “Archives” does not start with the same letters as “Feeds”.

Free C# book

illustratedcsharpRedGate is offering for free download the ebook “Illustrated C# 2008″.

This book is interesting for beginners because it has a lot of drawings and diagrams that explain better the concepts described by text. It could be used by persons migrating from C++ or VB to C# or it could even be the support material for a course.

In 730 pages the author, Daniel Solis offers a very visual approach – with lots of figures, diagrams and code samples – that will help you get to work with C# fast.

Go here to download your copy.

DreamSpark – Free Software and MCTS Certifications

DreamSpark is a program set up by Microsoft to provide students with software design and development tools at no charge. The program was originally available for university/college students in Belgium, China, Finland, France, Germany, Spain, Sweden, Switzerland, the U.K. and the U.S. but has now been expanded to more than 80 countries and is offered to many high school students. To register, students must visit the Dreamspark Website and verify their identity.

Without any charge through DreamSpark students can get the following software products (full versions!):

  • CCR DSS Toolkit 2008dreamspark_header
  • Expression Studio 2
  • Robotics Developer Studio 2008
  • SQL Server 2008 Express
  • SQL Server 2008 Developer
  • VirtualPC 2007
  • Visual Studio 2005 Professional
  • Visual Studio 2008 Express
  • Visual Studio 2008 Professional
  • Visual Studio 2008 Standard
  • Windows Server 2003
  • Windows Server 2008 Standard
  • XNA Game Studio 3.0

Also you get an IT Academy Student pass which provides free e-learning courses to students who are interested in extending their technical skills with Microsoft technologies.

The facts above are not really new. What is new is the fact that through DreamSpark students can get a MCTS Certification voucher. With this voucher they are provided with a free certification exam. Without the voucher the exam costs $50 which might be an important sum for a student.

One of the following exams ca be taken with this voucher:

Read the rest of this entry »

Using UAC with C# – Part 2

In part 1 of this tutorial I have presented how to run an application with and without elevation by specifying this from another process.

However there are some situations when an application cannot be run without administrative rights. For example a system configuration utility requires administrative rights to change some global policies.

In order to force an application to run only if the current user is administrator or can provide administrative credentials you must add a manifest to the C# project.

The manifest is an XML file named <application_name>.exe.manifest with the following content:

< ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
   <assemblyidentity version="1.0.0.0" processorArchitecture="X86" name="UACApp" type="win32"/>
      <trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
      <security>
         <requestedprivileges>
            <requestedexecutionlevel level="requireAdministrator"/> 
         </requestedprivileges>
      </security>
   </trustinfo>
</assembly>

What is important is the requestedExecutionLevel element. It specifies what permissions (execution level) the application needs in order to start. If the current user does not have the required level then an elevation window is displayed (see part one of the tutorial that describes the elevation window).

The default value of requestedExecutionLevel if it is not specified in the manifest or the manifest does not exist is asInvoker. Except asInvoker and requireAdministrator there is another execution level. All three are described below:

Value Description Comment
asInvoker The application runs with the same access token as the parent process. Recommended for standard user applications. Do refractoring with internal elevation points, as per the guidance provided earlier in this document.
highestAvailable The application runs with the highest privileges the current user can obtain. Recommended for mixed-mode applications. Plan to refractor the application in a future release.
requireAdministrator The application runs only for administrators and requires that the application be launched with the full access token of an administrator. Recommended for administrator only applications. Internal elevation points are not needed. The application is already running elevated.

In order to embed the manifest in the aplication’s executable you can choose one of the following options:

Read the rest of this entry »

April Fool’s Day – Live Search

The Live Search team has prepared a funny main page for the first day of April. if you hurry you might see it (use the US version of live.com)

1april_livecom

You might wonder what is that :D Moving the mouse over the animal’s nose reveals the following description:

1april_livecom_desc

Did you know that the animal is called Jackalope? (I didn’t) Wikipedia informs that:

The jackalope — also called an antelabbit, aunt benny, Wyoming thistled hare or stagbunny — is a folkloric animal and a cross between a jackrabbit and an antelope, goat, or deer, and is usually portrayed as a rabbit with antlers.

Well that’s funny but the funiest part is when hoovering the mouse over the left bottom side of the page. The following image is displayed: Read the rest of this entry »

Using UAC with C# – Part 1

user_account_control_administrator_dialogUser Account Control (UAC) is a new technology introduced by Microsoft in Windows Vista and most of the time it is misunderstood by users and developers. It’s main purpose is to protect the operating system by running applications with reduced privileges.

Why should we use this? Most applications DO NOT require full privileges. Think to the applications you have written and ask yourself if most of the job can be done without full writes (if you write to disk think if you could write in the user’s folder or an isolated storage, if writing in registry to HKLM think if you could write to HKLU, etc). The answer is mostly sure “Yes”.

So why run applications with full privileges when they can be run with limited? Running with more privileges than required is just a security vulnerability -  If an attacker exploits a vulnerability in your application he will gain more control.

There are two mistakes developers tend to do:unidentified_uac

  1. Request the end-user to run an application with full rights even though this is not necessarily (most of the time because of bad design practices)
  2. Do not request to user to run the application elevated but try to perform operations that require more rights

By design UAC can only elevate code at process level and only at process’ startup (means that a running process cannot be elevated). In the .NET world this also means that you cannot elevate code running in another app domain because the app domain is part of a running process. In order to elevate an existing application this must be closed and reopen with more privileges.

There are two types on UAC dialogs: blue and yellow. When you see a blue dialog you can be sure that the application requesting privileges is signed and trusted. The yellow dialog shows for any application that is not digitally signed and is not fully trusted.

User Account Control also prevents a lower privilege process to do the following (list below taken from MSDN):

  • Perform a window handle validation of higher process privilege.
  • SendMessage or PostMessage to higher privilege application windows. These Application Programming Interfaces (APIs) return success but silently drop the window message.
  • Use thread hooks to attach to a higher privilege process.
  • Use Journal hooks to monitor a higher privilege process.
  • Perform DLL injection to a higher privilege process.

Let’s see how an UAC aware application should look.

Read the rest of this entry »