This is a mirror of official site: http://jasper-net.blogspot.com/

arora

| Saturday, June 5, 2010
Arora is a lightweight cross-platform web browser. It's free (as in free speech and free beer). Arora runs on Linux, embedded Linux, FreeBSD, Mac OS X, Windows, Haiku, and any other platforms supported by the Qt toolkit.

Arora uses the QtWebKit port of the fully standards-compliant WebKit layout engine. It features fast rendering, powerful JavaScript engine and supports Netscape plugins.

Apart from the must-have features such as bookmarks, history and tabbed browsing Arora boasts:

very fast startup
integration with desktop environments
smart location bar
session management
privacy mode
flexible search engine management
ClickToFlash plugin
download manager
WebInspector, a set of tools for web developers
30 translations

Arora began as a demo by Benjamin Meyer to help test the QtWebKit component, but since then it has grown into its own project outside of Qt.

Read more: Google code

Posted via email from jasper22's posterous

minosse

| Thursday, June 3, 2010
Minosse is a complete SQL Relational DataBase System fully written in C#

Read more: Koders

Posted via email from jasper22's posterous

Base Library for Multi Thread Windows Services By Efe Erdogru

|
Introduction

This is a base library for multi thread windows services. It manages starting and stopping services and defines base structure.  

Library Description  

Interfaces

There are three interfaces in library.

“IConfigurable” defines the interface for the classes which can be configured.

“IRunnable” defines the interface for classes that have a determined lifetime for execution.

“IService” defines the interface for service classes.

Read more: Codeproject

Posted via email from jasper22's posterous

Working with JSON in .NET – a Silverlight example

|
Unlike any other .NET sub-framework, Silverlight has built capabilities to work with JSON. In this article, I am focusing on JsonObject, a class that can help the developer work with JSON content.

Here is my sample JSON data representation:

{ "parts" : {
"part" : [
{ "name" : "Mainboard" },
{ "name" : "Keyboard"  },
{ "name" : "CPU" },
{ "name"" : "FAN" }
] }
}

Nothing complicated to this point. Now, I want to read the array of objects declared inside the part element. To do this, I am going to declare an instance of JsonObject and JsonArray. While JsonObject handles single objects, an array will contain a multitude of objects.

An important note to be made is that you need to reference the System.Json library in order to work with the above mentioned classes.

Initially, I stored the existing JSON code in a sample string:

string jsonString = @"{ ""parts"" : {
                                   ""part"" : [
                                   { ""name"" : ""Mainboard"" },
                                   { ""name"" : ""Keyboard""  },
                                   { ""name"" : ""CPU"" },
                                   { ""name"" : ""FAN"" }
                                   ] }
                                   }";

Read more: DZone

Posted via email from jasper22's posterous

SELECT * FROM XML

|
Most people find it very difficult to deal with XML documents in TSQL as there is no way to run a ‘blind’ SELECT * query on an XML document to get a quick view of the content stored in it. A “select TOP N *” query can quickly give you a few records from the table which will give you an idea about the structure of the table and the type of values stored in the columns.  One of the common queries that I run on a table that I am not familiar with is

1.
SELECT TOP 1 * FROM tablename
This query will give me one record that I can review and understand the structure of the table. However, it is really hard to do something similar for an XML document. The “*” operator does not work for XML and hence I can write a query on the XML document only if I know the structure of the XML.

To make this easier, I have come up with a function that can give you a “SELECT * FROM XML” kind of functionality. You can pass an XML document to the function and it will return a tabular representation of the XML data. Here is an example that shows how you can use this function.

declare @x xml
select @x = '
<employees>
   <emp name="jacob"/>
   <emp name="steve">
       <phone>123</phone>
   </emp>
</employees>
'
SELECT * FROM dbo.XMLTable(@x)

/*
NodeName  NodeType  XPath                        TreeView      Value XmlData      
--------- --------- ---------------------------- ------------- ----- -------------
employees Element   employees[1]                 employees     NULL  <employees>..
emp       Element   employees[1]/emp[1]              emp       NULL  <emp name="..
name      Attribute employees[1]/emp[1]/@name            @name jacob NULL
emp       Element   employees[1]/emp[2]              emp       NULL  <emp name="..
name      Attribute employees[1]/emp[2]/@name            @name steve NULL
phone     Element   employees[1]/emp[2]/phone[1]         phone 123   <phone>123<..
*/


Read more: Beyond Relational

Posted via email from jasper22's posterous

Debugging .Net Framework 4.0 without source code using windbg

|
In this post I am going to be discussing about debugging .Net Framework 4.0  using windbg . I am going to demonstrating how to have a break-point within a method, but without the framework source code. This would help in debugging .NET framework when you don’t have VS in a production environment and the same technique can be used to debug other third party assemblies where you don’t have the source code.  This is kind of like .NET Reflector where you can step through third party assemblies, but without any cost. It is not going to be as convenient as the professional version of Reflector.

I am going to be using the same example that I used to debug .NET Framework source 3.5 using windbg.

FYI the .NET framework 4.0 has private symbols available on MS symbol server, but the source code is still not available. To debug .NET framework source code it is important to have correct symbol path and here is my symbol path in the _NT_SYMBOL_PATH environment variable.

view sourceprint?
1
SRV*d:\dev\symbols*http://referencesource.microsoft.com/symbols; SRV*d:\dev\symbols*http://msdl.microsoft.com/download/symbols
Here is the sample source code that I am going to be using to demonstrate framework debugging

using System;
using System.Net;
namespace Test
{

class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World of debugging");
var wr = WebRequest.Create("http://www.google.com");
Console.WriteLine("Web request created");
var req = wr.GetRequestStream();
Console.WriteLine("Hello World Debugging");
Console.Read();
}
}
}

Read more: Naveen's Blog

Posted via email from jasper22's posterous

Understanding message queue and the different types of Win32 messages

|
In this article, I will explain all about Win32 messages.

Terminology

System - Operating System
Applications - Microsoft Word or any other application

Contents

Windows Messages
Message Types
System-Defined Messages
Application-Defined Messages
Message Routing
Queued Messages
Non-queued Messages
Message Handling
Message Loop
Window Procedure
Posting and Sending Messages
Posting Messages
Sending Messages
Message Deadlocks
Broadcasting Messages
Windows Messages

The system passes all input (from input devices) to the various windows in an application. Each window has a function called a window procedure; the system calls this function whenever it has input. The window procedure function processes the input and returns control to the system. The system passes input to the window procedure function in the form of messages.

Messages are generated by both system and applications. The system generates a message at each input event - e.g., when the user types, moves the mouse, or clicks a control. An application can generate messages - e.g. when a dialog control (sel_change of Edit ctrl) creates a message and notifies its own window (dialog).

The system sends a message to a window procedure function with a set of four parameters: a window handle, a message identifier, and two values called message parameters. The values of the message parameters depend on the message.

Read more: Codeproject

Posted via email from jasper22's posterous

Is .NET More Secure Than Java?

|
Interesting question – eh? There is a great amount of passion on both sides of the argument. Beyond the emotion and hype, what’s the reality?

After Microsoft followed Java’s lead and adopted an interpreted byte code model (common language runtime) for .NET, our official position has been that in the hands of a skilled developer, both languages can be used to produce equally secure applications.

I had a client ask me this question last week, so I went looking for the latest data to back this up.

Veracode is an application security testing solution provider that scans binaries, byte code and web applications as a service. They keep track of the aggregated data of the applications they scan and have recently begun publishing reports on the overall security of the code their service analyzes. Since they support both .NET and Java byte code scanning, I went to them for some specific data.

This wasn’t published in their report (they are looking at adding this in the next revision), but this is what their data shows: the vulnerability density (average flaws per MB of code scanned) for .NET was 27.2 and for Java the overall density was 30.0.

Read more: Neil MacDonald

Posted via email from jasper22's posterous

How to win the lottery????

|
Hi all, it's my first post there(even first post ever) so I want that it would be a litle funny.A few months ago I saw behind bulding that I'm working in a big box with advertisement :

'Guess what in the box and you can win a dream vacation'

As person that never gained any prize in my entire life I was really curious what will be in the box, but how I can to guess???

On the 'Box' I've seen an Url of site that you need to enter for posting the guess.
So I entered to the site - it was simple flash application with couple of textboxes and button 'Submit'. As a good programmer, obviously I had fiddler always opens when I'm working.
The 'Fiddler' defines in it own site as 'Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet'. Ok let's check how 'Fiddler' can help us to win the lottery :
I filled all textboxes and clicked on submit after it I opened my good friend 'Fiddler'. You can't even to imagine how I was exciting when I saw in Headers section of 'Fiddler' the url that this flash site post all my details to. The url looks like this:'http://HostName/minisite/CarCompanyName/CarModel' (sorry that I can't publish real url ,I don't want to harm guys that developed this site) . So in the 'Url' I could see either car name and car model.

Read more: Time to pretend

Posted via email from jasper22's posterous

Соединение двух "серых" компьютеров

|
   Рассказывая про IP-адреса, я писал, что невозможно установить прямое соединение между двумя серыми IP-адресами, так как ни к одному из них нельзя обратиться напрямую. Теперь мне приходится признать, что я был неправ - существует малораспространенный трюк под названием UDP hole punching, позволяющий соединить два компьютера с серыми адресами. Конечно, без посредника не обойтись, но этот посредник нужен лишь на стадии установки соединения, дальше данные будут идти исключительно напрямую.
Сразу хочу предупредить - эта техника работает не всегда - если один из адресов находится за так называемым "симметричным NAT" или же за жестко настроенным прокси-сервером, то подобные действия будут пресечены. Но очень часто она может сработать.
Эта статья будет исключительно теоретической, если же вам нужны конкретные примеры использования UDP hole punching, то далеко идти не нужно - эту технологию использует Skype, сервисы типа Hamachi и TeamView, а также механизм туннелирования IPv6 трафика через IPv4 сети под названием Teredo. Обо всем этом я еще буду писать (и, соответственно, научу, как подобным способом повысить скорость раздачи в торрентах), но пока нужно привести теоретические обоснования...

Проблема

   Проблема заключается в том, что к серому IP адресу невозможно просто так отправить запрос - он принадлежит зарезервированному диапазону типа 192.168.*.*, и запрос на такой адрес не пройдет ближайший маршрутизатор или фаервол. Допустим теперь у нас есть пользователь A с подобным адресом, и он выходит в интернет через сетевое устройство N c реальным адресом. Что будет, если мы отправим запрос на устройство N? А ничего хорошего не будет - этот запрос до пользователя А не дойдет, если, конечно, на устройстве N не настроена "переброска портов" (подобное можно проделать, если сетевое устройство находится в вашем распоряжении, но мы сейчас рассматриваем более сложный случай).

Read more: Sander.su

Posted via email from jasper22's posterous

Mingw Static and Dynamic Libraries

|
Introduction

This article is intended to give a brief and simple introduction to compiling your own libraries with MinGW (Minimal GNU for Windows) compiler. This article assumes you have a basic understanding of the C language. First thing you'll need to do is download MinGW. I strongly suggest that you set the windows environmental path to the MinGW directory. This allows you to call the MinGW GCC compiler from any directory on your computer. On Windows7 it is right click on My Computer->Properties->Advanced->Environmental Variables and add the MinGW directory to the PATH or simply type this into cmd.exe.  

>SET PATH=%PATH%;C:\MinGW\bin

SET will temporarily set your environmental variables for the duration of your command prompt session. If you would like to permanently change your environmental variables add SETx instead of SET.

The Static Library

The following code was used to create both the static and dynamic library. It is a simple example to demonstrate a possible math library.

add.c:

#include "add.h"

int add(int a, int b) {
   return a + b;
}

add.h:

#ifndef ADD_H
#define ADD_H
int add(int a, int b);
#endif  // ADD_H

The main file demonstrates how to call the library file after its compiled. Notice that you require the header file or an external reference to execute a static library. In most cases if you share your library it will be in the form of a header file. The function declaration is necessary for the linker. If you did not have access to the header file you would need to go about reverse engineering the library to create the function declarations.

Read more: Codeproject

Posted via email from jasper22's posterous

Poor C++ developer’s performance profiler

|
A while back I wrote a post about how I’ve used Stopwatch to profile .NET applications, this post is similar, it shows how “micro-benchmarking” can be done in C++ and more importantly it also shows how we can create a “using block” in C++.

The unmanaged Stopwatch

Benchmarking in C++ can be done using the following code (courtesy of Igal T):

Header:

sourcecode_2109EDD0.png

Read more: Helper Code

Posted via email from jasper22's posterous

Understanding basic JSON

| Wednesday, June 2, 2010
JSON (JavaScript Object Notation) is a data representation format that can be considered an XML competitor. It’s structure is totally different from the XML one (since the structural principles differ), but the general idea is the same – it should ensure easy data transportation between applications and services. It is already implemented in several existing web services (small and large, like Twitter) and its share on the data exchange format market is growing due to its simplicity and organization.

If you want to take a look at some differences between the two formats, you can take a look at this article. Here, I am going to focus solely on the basics JSON.

Here is an example. Let’s suppose I have a data set, describing various computer parts, and I need to provide this data to an application. If I am going to think very abstract, there is a tree like structure, representing the base element (Computer Parts) and multiple child branches (for example: mainboard, keyboard, CPU, fan etc.)

By using the JSON data format, I can show the same tree-like structure just like this:

{ “parts” : {

“part” : [
{ “name” : “Mainboard” },
{ “name” : “Keyboard”  },
{ “name” : “CPU” },
{ “name” : “FAN” }
] }
}

Read more: DZone

Posted via email from jasper22's posterous

A COM and Registry review staring CLSID, TypeLib, Interface and AppID

|
If you are working with COM there are several registry entries that are important and that you need to understand. I will try in this post to clarify them. But before that, let’s enumerate the three possible COM server scenarios. (As a side note, a COM server is a DLL or EXE can contains one or more COM objects; a client is an entity that uses a COM object, which means a COM server can also be the client of another COM server.)

inproc: the COM server is loaded into the client process; in this case accessing the COM methods is as simple as using an interface pointer when the client and the in-proc server are in the same thread
local: the COM server and the client are loaded in different processes on the same machine; communication is achieved with the use of proxies and stubs via Lightweight RPC
remote: the COM server and the client are loaded in different processes on different machines; communication is achieved with the use of proxies and stubs via RPC

In order for the COM Library to be able to locate and instantiate the COM objects correctly, different information is stored in the Windows Registry. The most important information is located under the keys CLSID, TypeLib, Interface and AppID from HKEY_CLASSES_ROOT. The images below show examples for IIS.

Read more: Greg's Cool [Insert Clever Name] of the Day
Read more: Marius Bancila’s Blog

Posted via email from jasper22's posterous

Adding transparency to Silverlight Objects in an HTML page

|
Adding transparency to Silverlight Objects in an HTML page. These are assets for a tutorial in the training series 'Html Integration and Publishing'. Part of the Expression Blend and Silverlight 5 day OnRamp training course.

Read more: MS Download

Posted via email from jasper22's posterous

We’re not doing Google anymore.

|
Back in March, Long Zheng and I pushed out a Windows 7 Sensor that discovered your location using surrounding wireless access point data as a reference. For this to work properly, we needed a database that mapped geographical coordinates to access points. Without the resources needed to create our own super database, we decided to piggy back Google’s Location Services (GLS), the same technology used in Mozilla Firefox and Google Latitude. With its core easily accessible (via JSON) to the public, adoption was clean, easy and pretty darn fast.

Days before our 1.0 release in March, we touched base with Google in hopes to stir up interest and to ensure the GLS API was there to stay (for a while), on the heels of Gears’ transitory news. After a few exchanges, with a middle man, we were passed a note, paraphrased as such: The Terms of Service for the Gears API doesn’t allow for this type of usage.

Confused? We were, because we’re not using nor touched Google Gears. Reading the Google Gears TOS, we discovered this nugget of evil:

5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google.

To conform to the TOS – despite its confusing scope of applicability – Google wanted us to funnel our access through their deprecated Gears product (or ask for special permission). More focused on pushing out Geosense 1.0, we ceased communication with Google and simply put our blinders on. “They wouldn’t know any better, with their hundred million queries per day, pffft.”

We pushed out Geosense 1.0. 1.1. And finally 1.2, fixing some major issues.

Read more: Within Windows

Posted via email from jasper22's posterous

Using SketchFlow to create a website prototype

|
Using SketchFlow to create a website prototype. These are assets for a tutorial in the training series 'Create a Wordpress site using HTML, the Microsoft Web Platform and the skills you’re now familiar with in Expression Blend and SketchFlow'. Part of the Expression Blend and Silverlight 5 day OnRamp training course.

Read more: MS Download

Posted via email from jasper22's posterous

Microsoft Translator client library for Silverlight

|
A while back immediately after MIX10 I started messing with Microsoft Translator APIs for Silverlight applications.  I also got some people asking about Windows Phone 7 stuff and messed around with that a bit.  Here’s some post for reference:

Make your Silverlight applications speak to you
Using XNA libraries in Silverlight for Windows Phone 7 (with Translator as an example)

In talking with the Translator team following MIX (where they announced they were working on a Silverlight class library for the API.  It was good to interact with their team to understand their
direction and provide some feedback on how they were approaching it.  In the meantime, with their direction, I had started working on a simple wrapper for myself while writing the Translator for Seesmic plugin I was writing.  I’ve received a few inquiries on Translator so I thought I’d post my library here for you to see/use.

Read more: Method ~ of ~ failed

Posted via email from jasper22's posterous

Integrating Silverlight into your website

|
Integrating Silverlight into your website. These are assets for a tutorial in the training series 'Html Integration and Publishing'. Part of the Expression Blend and Silverlight 5 day OnRamp training course.

Read more: MS Download

Posted via email from jasper22's posterous

All of My Silverlight Video Tutorials in One Place (revised again 05.12.10)

|
Hello All,

This is a post that keeps growing day by  day so I need to update its postion to be at the top of my blog as the content grows. So, here it is again by popular demand:

49. How to add multiple BitmapEffects to one object in Silverlight: http://wp.me/pxXri-7K

48. How to build a Slider with a ToolTip that follows the thumb button and displays the value of the Slider: http://tinyurl.com/37ms8fl

47. How to build your very own TutorialCam like I use in my video tutorials! http://wp.me/pxXri-75

46. Fire one of two Visual States based on the value of a Boolean variable: http://wp.me/pxXri-71

45. How to add Fast Forward to the Silverlight MediaElement: http://wp.me/pxXri-6V

44. Create a custom ToolTip with a Delay: http://tinyurl.com/24cqcqu

43. Create a Silverlight Paging Systems to Load Pages on the Fly: http://wp.me/pxXri-6H

42. Create a Slide In/Out Navigation Panel: http://wp.me/pxXri-6B

41. How to use Joe Stegman’s PngEncoder to save an image from your Silverlight application: http://wp.me/pxXri-6y

40. How to create complex gradients: http://tinyurl.com/ycjcpd5

39. My Blend IDE series – Part 1 – the Blend Toolbar: http://tinyurl.com/yh48uh8

38. My Learn Blend IDE series Part 2 – Layout Controls and User Input Controls: http://tinyurl.com/yblcjyk

37. My Learn Blend IDE series Part 3 – The Properties, Projects and Data panels: http://tinyurl.com/ykvcdkk

36. My Learn Blend IDE series Part 4 – The Objects & Timeline and States panels: http://tinyurl.com/y8ztcds

35. My Learn Blend IDE series Part 5 - Blend’s Animation Workspace – Everything you need to know to create Storyboard Animations -  http://wp.me/pxXri-56

34. How to make a 3 column ListBox in Silverlight: http://tinyurl.com/yhxspew

33. How to read XML into Silverlight and turn it into Native Silverlight Objects: http://tinyurl.com/ybm27su

32. Create a default Silverlight 4 Out Of Browser app that allows you to create new OOB apps in mere seconds: http://wp.me/pxXri-4h

31. How to make a forever scrolling Silverligh banner: http://tinyurl.com/ykkd7kl

30. How to create a Silverlight Color Resource in a ResourceDictionary: http://tinyurl.com/yhxc28z

29. How to make an Out of the Browser SL4 Web Browser Applicaiton: http://tw0.us/5jy

28. Use the new Silverlight 4 Webcam API to create a cool webcam app that even let’s you save images to your hard drive: http://tw0.us/5RD

27. Use the new Silverlight 4 COM API to make an Out of the Browser application that is able to open a MS Word document: http://tw0.us/5NN

26. How to make a Timer by using the DispatcherTimer class: http://tw0.us/4my

25. Create a Functioning Login UserControl: http://tw0.us/4o3

24. Use the FarseerPhysics Library to create a Ragdoll with simulated Physics: http://tw0.us/4pA

Read more: Victorgaudioso's Silverlight Blog

Posted via email from jasper22's posterous

Writing Your Own VMConnect App/Web Interface For VM Console Access To Hyper-V VM’s

|
Hyper-V’s first beta I’ve had people ask about the ability to write there own custom interface to replace VMConnect.  Some wanted a windows application other’s wanted to write a web application.  The goal’s varied from wanting to just show the console session for monitoring to integrating it VM’s into existing physical machine applications to wanting to develop custom hosting applications allowing users to do some things like start/stop and interact but nothing more.  When we started developing Hyper-V we decided that instead of writing our own transport for sending over screen images, key strokes, mouse etc… that we would instead leverage the existing remote desktop protocol (RDP, Terminal Services, TS, what ever you want to call it).

That means that accomplishing developing such a applications is actually pretty straight forward if you know the magic incantation.  The good news is that the Dynamic Datacenter Tool Kit team has posted a full C# sample for just this.  If you combine this code with some of the other code posted either here on my blog or on MSDN you can pretty easily write your very own Hyper-V UI.

The Dynamic Data Center Toolkit for Hosters is located at http://code.msdn.microsoft.com/ddc and the Hyper-V RDP Active X control sample is a sub project off of that page.

Read more: Taylor Brown's Blog

Posted via email from jasper22's posterous

Video: Hardcore production debugging in .NET – Ingo Rammer

| Tuesday, June 1, 2010
I got Ingo Rammer’s permission to post this video of one of his Teched EMEA 2008 talks – it’s about hardcore production debugging, and it’s a wonderful talk. I highly recommend you watch it. Also you should consider getting the book Advanced .NET Debugging – it’s wonderful (though pretty advanced!)

FYI, you can find many other .NET and unit testing videos here.

Read more: ISerializable - Roy Osherove's Blog

Posted via email from jasper22's posterous

Fedora 13 Is Out

|
Fedora 13 has just been released. It includes major features such as automatic print driver installation, automatic language pack installation, redesigned user account tool, color management to calibrate monitors and scanners, experimental 3-D support for NVIDIA video cards, and more

Read more: Fedora project

Posted via email from jasper22's posterous

Deploying Windows 7 - Part 2: Using DISM

|
Understanding DISM

DISM.exe is a new command-line tool that is included both in a default install of the Windows 7 operating system and also as part of version 2.0 of the Windows Automated Installation Kit (Windows AIK).

Note:
Support for VHD files as bootable Windows images is new in Windows 7 and is described in a later article of this series.

You can use DISM.exe service Windows images, including both Windows image (WIM) files and virtual hard disk (VHD) files. While DISM.exe is primarily intended for servicing offline (not running) Windows images, some of its functionality can also be utilized to service online (running) Windows operating systems. By servicing an image we mean doing things like adding or removing device drivers, adding or removing operating system packages, adding hotfixes, configuring international settings, and performing similar types of actions on the image. DISM can also be used to upgrade a Windows image to a different edition (for example, to upgrade from Business to Ultimate) and to prepare a Windows PE image for use.

You can use DISM.exe to service images of the following Windows versions:

Windows Vista SP1 or later
Windows Server 2008
Windows 7
Windows Server 2008 R2
Using DISM

In Windows Vista (or using the Windows AIK 1.1) servicing an image required using several different tools. For example, let us say you wanted to install an out-of-box device driver on an image you captured previously from a master installation. To do this in Vista, you had to:

Mount the image using ImageX
Add the device driver using Package Manager (Pkgmgr.exe)
Unmount the image using ImageX
In addition, if your image was a Windows PE image then you also need to use the Windows Preinstallation Environment (PEimg.exe) tool to prepare the image. And finally, if you needed to modify the language and locate settings of the image, you had to use the International Settings Configuration Tool (Intlcfg.exe).

Beginning with Windows 7 however, DISM.exe now replaces the Pkgmgr.exe, Intlcfg.exe and PEimg.exe tools found in the earlier 1.1 version of the Windows AIK. In addition, DISM also includes functionality for mounting and unmounting images so you can service them.

A typical use for DISM might be to add a device driver to an offline Windows image prior to deploying the image onto hardware that requires that driver. Let's walk through such a scenario to learn how to use DISM from the command-line.

First, in the C:\Images folder on our Windows AIK 2.0 technician computer is a Windows install image (install.wim file) for Windows 7:

C:\Program Files\Windows AIK\Tools\PETools>dir C:\Images

Volume in drive C has no label.

Volume Serial Number is 1C9A-D699

Directory of C:\Images

05/03/2009  12:46 PM    <DIR>          .

05/03/2009  12:46 PM    <DIR>          ..

04/22/2009  07:28 AM     2,218,242,699 install.wim

              1 File(s)  2,218,242,699 bytes

              2 Dir(s)  180,411,486,208 bytes free

Note:
Remember from article 17 of my Deploying Vista series that there are two types of Windows images: boot and install images :)

Read more: WindowsNetworking.com

Posted via email from jasper22's posterous

CERT Releases Basic Fuzzing Framework

|
Carnegie Mellon University's Computer Emergency Response Team has released a new fuzzing framework to help identify and eliminate security vulnerabilities from software products. The Basic Fuzzing Framework (BFF) is described as a simplified version of automated dumb fuzzing. It includes a Linux virtual machine that has been optimized for fuzz testing and a set of scripts to implement a software test

Read more: Slashdot
Read more: Cert

Posted via email from jasper22's posterous

GCC Moving To Use C++ Instead of C

|
CodeSourcery's Mark Mitchell wrote to the GCC mailing list yesterday reporting that 'the GCC Steering Committee and the FSF have approved the use of C++ in GCC itself. Of course, there's no reason for us to use C++ features just because we can. The goal is a better compiler for users, not a C++ code base for its own sake.' Still undecided is what subset of C++ to use, as many contributors are experts in C, but novices in C++; there is a call for a volunteer to develop the C++ coding standards.

Read more: GCC

Posted via email from jasper22's posterous

Chinese Networking Vendor Huawei's Murky Ownership

|
A month ago we mentioned India's suspicions that telecomm equipment from China might contain backdoors. There hasn't been any smoking gun on such speculation. Now reader littlekorea sends in some background on the ties one important Chinese telecomm vender might or might not have to the government there.

Conspiracy theories abound as to whether networking kit vendor Huawei is owned or controlled by the Chinese government and/or the military-industrial complex. But who really owns Huawei? Kiwi journalist Juha Saarinen headed to Shanghai to find out

Read more: Slashdot

Posted via email from jasper22's posterous

Darik's Boot and Nuke ("DBAN")

|
Darik's Boot and Nuke ("DBAN") is a self-contained boot disk that securely wipes the hard disks of most computers. DBAN will automatically and completely delete the contents of any hard disk that it can detect, which makes it an appropriate utility for bulk or emergency data destruction.

Read more: DBan

Posted via email from jasper22's posterous

SimilarSites.com

|
SimilarSites.com is a related content engine, displaying a list of related sites for any site that a user submits. Based on the same technology, our free browser add-on SimilarWeb displays sites and articles related to the sites a user is browsing

Read more: Similarsites.com

Posted via email from jasper22's posterous

Who Needs Windows? Google Starts Putting Their Computers Where Their Mouth Is

|
I’m not sure Google has ever come out and said that they hope the future of computing doesn’t involve Windows. But we all know they’re thinking it. However, while they may think that way, it’s been hard to take that too seriously since most of the computers they do their work on likely run Windows. In the near future though, that may not be the case.

A new report tonight in the Financial Timessuggests that Google is steering its employees away from using Microsoft’s dominant operating system in the workplace. In fact, the reports says that, “New hires are now given the option of using Apple’s Mac computers or PCs running the Linux operating system.” And it states that getting a computer running Windows may require permission as high up as Google’s CIO.

I wouldn’t be surprised if we see some of this downplayed by Google over the next few days (the sources are all anonymous employees rather than spokespeople). But I also wouldn’t be surprised if it’s entirely true. Google does believe that it was vulnerabilities in Windows that lead to the infamous Chinese hacking incident earlier this year (which subsequently led them to pull out of China). They undoubtedly know that while they may have closed one hole, many others exist, and it’s only a matter of time until another incident happens again.

That is, unless they switch to one of the OSes much less popular with both users and hackers alike (and generally thought to be more secure): OS X and Linux. So that’s apparently what they’re trying to do.

Read more: TechCrunch

Posted via email from jasper22's posterous

How to slipstream SQL Server 2008 R2 and a Cumulative Update (CU)

|
Now that CUs are beginning to ship for SQL Server 2008 R2, I figured I needed to send out updated slipstream instructions for SQL Server 2008 R2. Since the original release of SQL Server 2008 R2 knows how to slipstream, the instructions are easier.  There are 2 different ways to slipstream. The first way, let’s call this the basic method, is to run the SQL Server Setup program and specify where to find the extracted CU files. The second way, let’s call this the advanced method, is to build a drop that will automatically slipstream the CU. Each time a new CU releases for SQL Server 2008 R2, you need to repeat the instructions below.

You can find the first CU for SQL Server 2008 R2 here.

The basic method:

The method is preferred if you want to perform a single install that includes the CU without needing to build a full drop and without needing to download all CU architectures.

Steps:

1. Download the CU package (in my example, I am using the x64 CU1 for SQL Server 2008 R2) that you want to slipstream. If you are running on x86 or IA64 system, select the appropriate package.

2. Extract the CU package to a folder, for example c:\MyCU. Extract the package as follows:

SQLServer2008R2-KB981355-x64.exe /x:c:\MyCu

3. Run Setup.exe

Setup.exe /CUSource=”c:\MyCu”

You can verify you are slipstream, when you view the “Ready to Install”. On this dialog, the word “(Slipstream)” will display after the Action as shown below.

Read more: SQL Server Setup

Posted via email from jasper22's posterous

Office 2010 Digital Signatures and XAdES

|
Shelley Gu, the program manager for Office signatures, has already posted the PM version of what we've done to improve digital signatures in the Office 2010 Engineering blog back in December. Her post is here. While Shelley did a nice job of an overview for the average user, I'd like to dive a bit more into detail. I also noticed that there are a bunch of comments to her post that haven't been answered, and I'll do that in a following post here.

While there have been a number of improvements, the biggest change has been the addition of XAdES. XAdES is an extension to the XML-DSig that provides for a number of improvements, and allows for very long-lived signatures. The first specification for XAdES showed up at http://www.w3.org/TR/XAdES/, and dates back to 2003. The full, most recent specification is 1.4.1, and can be found at http://uri.etsi.org/01903/v1.4.1/ts_101903v010401p.pdf. It takes a bit of poking around to find the exact link to the PDF, but I confirmed that the link worked and is valid as of this writing (5/30/2010).

Getting XAdES into Office turned out to be a bit of an adventure. It started off with a request to add time stamping support, and it all had to be done in a big hurry, and we'd decided not to use XAdES, because it was supposedly hard. The first iteration was very non-standard. Once I'd gotten it done, then all of a sudden we just had to use XAdES, and we were in a big hurry for that, too. Some grumbling ensued, but I went off and did it. We first implemented up to XAdES-T (explained in a moment), which is what shipped in beta 2. Some time passed, Shelley came along, and then we decided we just had to have nearly full XAdES support, taking us up to XAdES-X-L, and that needed to be done in a hurry, too (are you sensing a theme?). Getting that part done happened after beta 2, which was just short of a miracle – not much makes the bar at that stage of the game. We've ended up with XAdES support for Word, Excel, PowerPoint and InfoPath.

Read more: David LeBlanc's Web Log

Posted via email from jasper22's posterous

Sample ClasFilt INF Adding the uninstall process

|
Hello, everyone.Ais Shou.

But suddenly, it was almost everybody has dropped down from the ship captains of the ship's available? ... If you are interested in this story of interest - until the end of the text - I digress.

Well,my previous postin,ClasfiltsampleINFfiles I referred to. ThisINFfile, you probably noticed some of you,INFHow to uninstall itself is not described. So this time,ClasfiltsampleINFI will show you how to add files to the uninstall process.


Overview of the following additional steps.
(1) INFfile[DefaultUninstall]section add
   (1-1) DelFilesadd directives
   (1-2) DelRegdirectives to add
(2) INFfiles[DefaultUninstall.Services]section add


Now, each step explained below.

Read more: Japan WDK Support Blog

Posted via email from jasper22's posterous

Piracy in .NET Code – Part 2 – Even when the code is obfuscated

|
Continuing with my previous post, one of the biggest security holes I have noticed in certain application is using unsecure Network I/O communication, especially when activating license. I have seen software where they have used the best tool to obfuscate the code, it is extremely hard to disassemble this. But lose out by invoking a web service with plaintext xml for registration and communication. Like I mentioned in my previous post, I am not going to be discussing on how to solve this problem.

I have seen applications which would have a trial period after which the application pops-up a dialog box for activating license. Only if license text matches the format criteria (like xxx-xx-xxxx-xx) the send button enables. To circumvent the disabled button, some of the smart developers could enable the button within the debugger (windbg /cdb) or using a something like HawkEye . This is the first line of defense for the application.

The next thing is launching something like Fiddler and checking out the web service request /response for the activation request. I am sure most of us have dealt with fiddler, and if you are not aware, fiddler gives an option to have a break-point on response from the server. So it is easy to do a Man-in-the-middle attack by injecting your own response or someone could even hack the lmhost file to act as a server.

And just because it is plain text, I have usually seen a bool variable in the response being activated or not. And it is not hard for someone to update the response text and pass it as a response back from the server.

Read more: Naveen's Blog Part 1 – Even when the code is obfuscated, Part 2 – Even when the code is obfuscated

Posted via email from jasper22's posterous

Internet Explorer 9 — наиболее полное руководство разработчика (и не только)

|
Известно, что Internet Explorer – браузер, который обновляется нечасто. Можно долго рассуждать почему так происходит и правильно это или нет. Однако точно можно сказать другое – функции, которые появляются в Internet Explorer стоят самого пристального внимания разработчиков. Это происходит просто потому, что сам IE и его функции – это мэйнстрим и, как правило, на момент выхода они реализованы в большинстве других браузеров, которые больше стремятся быть на краю нововведений.

Бывают и исключения, так нативная поддержка JSON, поддержка HTML5 DOM Storage, разделение вкладок на процессы, HTML 5 Networking Events и некоторые другие вещи были внедрены в Internet Explorer 8 раньше многих других браузеров.

В связи с этим, я считаю, важно знать и иметь в виду тот новый функционал, который преподнесет девятая версия все еще самого популярного браузера (но, наверное, не самого функционального и удобного).

Read more: Habrahabr.ru

Posted via email from jasper22's posterous

VISUAL STUDIO 2010 COLOR SCHEMES

|
8053.shot1_5F00_thumb_5F00_260DCF6C.png

In Visual Studio 2010 ist die Integration von Add-Ins durch den Extension Manager einfach. Einer dieser Add-Ins ist der Visual Studio Color Theme Editor. Nun gibt es für diesen Editor ein Expression Blend Dark Theme. Leider sind nicht alle Fenster in Dunkel gehalten, aber man kann es sich ja auch noch selbst anpassen.

Des Weiteren kann man auf der Seite Studiostyles.info zusätzlich vorgefertigte Farbschemas für den Editor runterladen.

Read more: Durchlauferhitzer!

Posted via email from jasper22's posterous

Windows Azure – Step-By-Step Tutorial- Post#1-Introduction

|
Cloud computing – the most used (misused) term now a days is becoming more and more popular. I must say with Microsoft’s Azure Offerings the competition became tough and there seems to be no end to enhancements that these players will continue offering in this space. Although as a developer you might try to skip Windows Azure as a buzz word – you will still need to learn and gain knowledge around the tools, technologies and standards supported on this platform.

Before I start taking about what I am going to cover in this step-by-step tutorial I must appreciate the work that Microsoft has done so far in terms of providing learning resources and tools that are free to use. One of such freely available resources is “Windows Azure Platform Kit” which comes with very good presentations and Hands on exercise. Second such resources is “Channel 9 Videos” which are excellent to dive deep into a particular topic on Windows Azure.(for that matter I would say any of the Microsoft Products). By now you must be wondering if I am giving information about the resources etc.. here, then why I am creating “Step – By- Step Tutorial” ?? The answer is in the title itself – all these resources are excellent for those who has some basic knowledge on Windows Azure but these resource do not provide step wise learning. This is what I am trying to address via this tutorial.

Below is the agenda which I will be covering during this tutorial (via couple of blog posts/video):

  1. Introduction to Windows Azure and Cloud Computing
  • Understanding Cloud Computing
  • The Windows Azure Platform
  • Azure AppFabric
  • SQL Azure
  • When not to use the Cloud
  1. The Infrastructure
  • Inside the Cloud
  • The Data Centers
  • The Hypervisor
  • The Fabric

  1. Developing Applications with Windows Azure
  • The Windows Azure Tool Set
  • Developing Your First Azure Application
  • Using the Visual Studio Tools

  1. Service Model
  • Windows Azure Roles
  • Service Definition and Configuration
  • EndPoints
  • Inter-Role Communication
  • Worker Role Lifecycle and Patterns
  • Service Management
  • Windows Azure Development Portal
  • Service Management API
  • Dealing with Upgrades

  1. Storage Fundamentals
  • Windows Azure Storage Characteristics
  • Windows Azure Storage Services
  • Getting started with a Storage account
  • Using SDK and Development Storage

  1. Using Blobs
  • Understanding Blobs
  • Usage Considerations
  • Understanding Blob types

  1. Using Queues
  • Windows Azure Queue Overview
  • Understanding Queue Operations
  • Understanding Message Operations

  1. Using Tables
  • Windows Azure Table Overview
  • ADO.NET Data Services
  • Table Operations

  1. Common Storage Tasks
  • Exploring Full-Text Search
  • Modeling Data
  • Improving Performance
  • Concurrent Updates

  1. Building a Secure Backup System
  • Understanding Security
  • Protecting Data in Motion
  • Protecting Data in Rest

  1. SQL Azure
  • Creating and Using SQL Azure Database
  • Difference between SQL Azure and SQL Server

Read more: Sandeep Joshi's Den

Posted via email from jasper22's posterous

Как сделать загрузочный USB Flash Drive (загрузочную флешку)

|
Нашел шикарную статью и классную утилиту.

Как известно, задача поставить Windows почему то у ITшников возникает периодически (то ли руки чешутся все переставить, то ли еще какая причина). И как обычно, под рукой не оказывается либо лишнего DVD диска, либо (как в моем случае) DVD дисковода. Либо это нетбук,  либо , как у меня, вместо оптического привода засунут лишний жесткий диск.

Обычно создание загрузочной флешки является танцами с бубном.

В принципе есть вариант такой, но он у меня не заработал.

Read more: Marat Bakirov [MSFT]
Read more: MakeTechEasier
Read more: WinToFlash

Posted via email from jasper22's posterous

COM+ : 0x8004E002 : The root transaction wanted to commit, but transaction aborted.

|
The COM+ application 'eConnect' is unable to complete distributed transactions successfully against the SQL server. It fails with the error :

(0x8004E002): The root transaction wanted to commit, but transaction aborted.

The eConnect COM+ application tries to send xml data to the SQL server on another server. Both the servers are Windows 2008. It runs for a while and then comes back with the error message :

System.Runtime.InteropServices.COMException (0x8004E002): The root transaction wanted to commit, but transaction aborted (Exception from HRESULT: 0x8004E002)
at System.EnterpriseServices.IRemoteDispatch.RemoteDispatchNotAutoDone(String s)
at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_EntryPoint(String ConnectionString, ConnectionStringType ConnectionType, String sXML,
SchemaValidationType ValidationType, String eConnectSchema)
at DirectDocSenderDotNet.FrmDocSender.btnSend_Click(Object sender, EventArgs e)
in C:\program files\Common Files\microsoft shared\eConnect 10\eConnect Samples\CSHARP DirectDocSender\frmDocSender.cs:line 379


Checked the DTC security settings under component services --> computers --> My computer --> local dtc --> security. Enabled Network DTC access and the other options :

Allow remote clients
Allow remote administrations
Allow inbound
Allow outbound
No authentication required

Read more: Ajit Yadav blog

Posted via email from jasper22's posterous

Debugging Exceptions in Visual Studio

|
Debugging Exceptions in Visual Studio. These are assets for a tutorial in the training series 'Top gotcha's when working with Silverlight and Expression Blend'. Part of the Expression Blend and Silverlight 5 day OnRamp training course.

Read more: MS Download

Posted via email from jasper22's posterous

Creating and using an XML Datasource

|
Creating and using an XML Datasource. These are assets for a tutorial in the training series 'Working with Data when designing your UI'. Part of the Expression Blend and Silverlight 5 day OnRamp training course.

Read more: MS Download

Posted via email from jasper22's posterous

Physics Platformer Gish Goes Open Source

| Monday, May 31, 2010
After announcing plans to go open source due to the success of the Humble Indie Bundle, developer Cryptic Sea has released the source code of 2-D platformer Gish under the GPLv2. There's a mirror on github.

Read more: Slashdot
Read more: github

Posted via email from jasper22's posterous

Cutting Through the 4G Hype

|
Cell phone companies are about to bombard us with advertising for the next big thing — 4G access. The first 4G phone, Sprint Nextel's EVO, comes out this week. But just how big a deal is 4G? Is it fast enough to warrant the hype, or are consumers better off waiting a while? AP technology writer Peter Svensson looks at the differences between 4G and 3G technologies.

Read more: Slashdot
Read more: Google hosted

Posted via email from jasper22's posterous

MDOP error reporting for small, midsize, and large companies

|
It is time to do a blog post that points to some resources about the Microsoft Desktop Optimization Pack (MDOP), since we get a lot of questions about how Error Reporting can work better for small, mid-size, and large corporations.  This is part of the Microsoft Software Assurance Program and provide many of the benefits of Windows Error Reporting that IT Professionals can customize.  Part of the customizations enable IT Professionals to better analyze and respond to common problems within their organization.

A SpringBoard Series is available here: http://technet.microsoft.com/en-us/windows/bb899442.aspx

A great starting place to learn about all MDOP has to offer is here: http://technet.microsoft.com/en-us/windows/ff383366.aspx

Read more: WER Services

Posted via email from jasper22's posterous

A C# Version of DotNetNuke

|
Did you hear the news? You can get DotNetNuke in C# now! What? Say it ain’t so, DotNetNuke has abandoned VB.NET? Well not quite, the release and production version of DotNetNuke is still in VB.NET, though a kind soul has spent some time lately converting DNN to C#. For all the details you can check out Scott’s blog post over on DotNetNuke.com

Never fear VB lovers, DotNetNuke isn’t moving away from VB.NET anytime soon (afaik), but this C# port of the project is just another way for people to get involved with the project that had trepidations about it being written in VB.NET.

Read more: Chris Hammond
Read more: DotNetNuke

Posted via email from jasper22's posterous

Managed code using unmanaged memory: HeapCreate, Peek and Poke

|
In the old days of Basic (starting over 4 decades ago), there were functions called Peek and Poke that would allow you to read and write memory directly. These were incredibly powerful commands: you could, for example, read and write directly to the hardware, like the video display, the tape cassette recorder, or the speaker.

More modern versions of the language dropped Peek/Poke. However, you can still read and write memory, even from managed code, and this ability is still extremely powerful. You can’t write directly to the speaker, but you can do other fun things: see What is your computer doing with all that memory? Write your own memory browser and Use Named Pipes and Shared Memory for inter process communication with a child process or two

The word “Managed” when applied to languages means that the memory that the program uses is automatically managed for the program: you can just use memory without paying attention to freeing it (usually). there is an automatic unused memory (“garbage”) collector.
(see Examine .Net Memory Leaks).

In this sample we’ll create our own heap into which we’ll write and then read some memory. Keep in mind that the memory could come from anywhere, not just our own heap. We define a TestData structure that has only 2 integer data members. Strings are more complicated because of variable length, encoding, allocation issues.
(see HeapCreate and  Marshal.PtrToStructure)

Start Visual Studio 2010. (you can use older versions, but you’ll have to remove some of the new features I’ve used in the code)
File->New Project->(VB or C#) Windows ->WPF Application.

Double click on the form designer to get the code behind file. Replace with the respective version from below.

Make sure you have Tools->Options->Debugger->Just My Code unchecked.

Put a breakpoint (F9) on the first line and single step through. Observe the values change as each line is executed.

If you choose Debug->Windows->Memory1, you can try to see the memory by putting the Address ptr ( like 0x09C307D0) in the address window to see the memory. (In C#, you can drag/drop the address from the Locals window to the Memory window.)  Right click on the memory window and choose to display the memory as 4 byte integers.  

Read more: Calvin Hsia's WebLog

Posted via email from jasper22's posterous

HOT GUIDS - Socializing the Guid

|
Finally there's a place where people can vote on and discuss their favorite guids.

I've built in pretty much all the best social features. You can vote on a guid, see other votes for a guid, adopt a guid, or email a guid to your friends. And if you get sick of the guid you're looking at: with the click of a button you can move onto a whole new guid.

I'm trying to really take the long tail of human interest by storm. If I get just one customer for each guid, then I'll get... oh I don't know, it must be a *lot* of hits.

Thanks to Stack Overflow for the guid generating snippet. The web template started out the same as 'CreditCardOlogy' but with a little (Powerpoint + MSPaint + PngOut) I took it to a new place entirely.

If you're unsure what any of this is about, please read about guids (& UUIDs) at wikipedia, or try running this Simple Proof That Guid is not Unique.

And make sure email me if you see any particular delicious looking guids. There's some beauties out there.

Read more: SecretGeek
Read more: Hot GUID

Posted via email from jasper22's posterous

JoshDOS

|
JoshDOS is a command line operating system kernel based off COSMOS. It can be booted from actual hardware and built in Visual Studio using .NET languages. It is developed in C#.

Project Goal

  • To create an easy way to create DOS like operating systems.
  • To premote COSMOS, the C# open source managed operating system.
  • Use .NET to create operating systems 
  • and just to have fun!

Read more: Codeplex
Read more: COSMOS

Posted via email from jasper22's posterous

Kyoto Cabinet

|
Kyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
Kyoto Cabinet runs very fast. For example, elapsed time to store one million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree database. Moreover, the size of database of Kyoto Cabinet is very small. For example, overhead for a record is 16 bytes for hash database, and 4 bytes for B+ tree database. Furthermore, scalability of Kyoto Cabinet is great. The database size can be up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C, Java, Python, Ruby, and Perl. Kyoto Cabinet is available on platforms which have API conforming to C++03 with the TR1 library extensions. Kyoto Cabinet is a free software licensed under the GNU General Public License.

Read more: Kyoto Cabinet

Posted via email from jasper22's posterous

SQL Server: миф дня (1/30) - После сбоя, выполнение текущих транзакций будет продолжено

|
Всем привет! Сегодня я хочу начать серию постов, в основу которых положены публикации известного и уважаемого человека в мире SQL Server - Пола Рэндала, в которых он описывает 30 наиболее распространённых мифов в работе с SQL Server.  Пол писал по посту каждый день, на протяжении всего апреля. Подобную скорость обеспечить навряд-ли смогу :) но обещаю по мере сил развенчивать новые и новые мифы вместе с Полом. Итак, к делу!

Миф №1 – После сбоя, выполнение текущих транзакций будет продолжено
       После того как на сервере происходит аппаратный либо программный сбой, начинается ряд операций по восстановлению системы после сбоя. И если транзакция не была зафиксирована на сервере до сбоя, то не существует способа автоматически воссоздать контекст транзакции и "воскресить" выполнявшуюся транзакцию на резервном сервере, какой бы способ обеспечения отказоустойчивости вы бы ни избрали: отказоустойчивый кластер, зеркалирование, доставка журналов или SAN репликация.

       В отказоустойчивом кластере, когда происходит сбой на основном сервере, поднимается экземпляр на резервном. В процессе восстановления после сбоя все не завершённые транзакции (в том числе и аварийно завершённые) откатятся (механизм восстановления после сбоя более подробно описан в статье Ведение журнала и восстановление в SQL Server).

       При зеркалировании БД лог транзакций зеркальной базы постоянно пополняется записями лога основной БД. После чего эти инструкции выполняются на зеркальной базе. Этот механизм позволяет обеспечить согласованность основной и зеркальной баз. Когда происходит переключение серверов (ручное, либо автоматическое в результате сбоя) лог транзакций зеркальной базы переходит в режим восстановления после сбоя, в ходе которого все незавершённые транзакции будут откачены. После восстановления сервер разрешает соединения с базой данных.

       Механизм доставки журналов подразумевает периодическое снятие бэкапа лога транзакций БД первичного сервера, копирования и восстановление на произвольном количестве вторичных серверов. После сбоя администратор баз данных поднимает один из вторичных серверов. При этом он имеет возможность снять резервную копию лога транзакций с первичной БД (уже после отказа БД) и накатить её на вторичную. И опять таки, в этом случае, как часть процесса востановления произойдёт откат всех незафиксированных транзакций.

       В SAN репликации все I/O операции которые просходят на локальном SAN дублируются на удалённом, что позволяет иметь удалённую копию БД. Когда происходит сбой, система соединяется с удалённым SAN, и происходит процесс восстановления после сбоя, точно так же, как и в отказоустойчивом кластере (это упрощенное объяснение, - но идея ясна).

       *Единственный* способ, позволяющий поддерживать непрерывное соединение с БД во время сбоя – использование виртуализации с функцией "live migration", которая подразумевает то, что когда виртуальная машина поднимается, соединения не знают, что они обращаются к другому физическому узлу, на котором находится виртуальная машина.

       Но какой бы механизм вы ни использовали – если *соединение* разорвано, все данные выполняющихся в данный момент транзакций будут потеряны. Поэтому ваше приложение должно разрабатываться с учётом таких ситуаций: корректно обрабатывать разрыв соединения с базой данных и возможно выполнять повторный запуск команд.

Read more: Denis Reznik's blog

Posted via email from jasper22's posterous

ASP.NET MVC Time Planner

|
MVC Time Planner is simple time planning solution for personal users and groups. Users can log in to time planner using LiveId. There are still a lot of things I plan to do to make this soution also suitable for groups and teams. As I am developing MVC Time Planner from my free time please don't expect commercial level speed of development.

I wrote this application for one of my sessions and also published some development details in my blog. As my blog readers are asking more and more for source code of Time Planner application then I decided to port it over to Visual Studio 2010 and make it available to whole world.

MVC Time Planner project is maintained by ASP/ASP.NET MVP Gunnar Peipman.
Tools and technologies used in this project:
Visual Studio 2010 Ultimate Edition
.NET Framework 4.0
ASP.NET MVC 2
SQL Server 2008 Express Edition
NHibernate
Unity
LiveId
jQuery
jQueryUI
FullCalendar

Read more: Codeplex

Posted via email from jasper22's posterous

Static constructor in C#

|
Did you ever implement a singleton in c#? For those who don't know what a singleton is, it is a class which can only have one instance, more on Wikipedia. The preferred implementation of a singleton in c# is the following.

public sealed class Singleton
{
  //single instance
  private static readonly Singleton instance = new Singleton();
 
  //private constructor
  private Singleton(){}

  public static Singleton Instance
  {
     get
     {
        return instance;
     }
  }
}

But what would you do if you want to execute some custom code before the instance of the singleton is initialized? You can use the classic singleton code which isn't really different than in other programming languages.

Read more: Baldi's Blog

Posted via email from jasper22's posterous

New Ebola Drug 100 Percent Effective In Monkeys

| Sunday, May 30, 2010
A team of scientists at Boston University has created a cure for the Ebola Virus, first discovered in 1976. After setting the correct dosages, all monkeys tested with the vaccine survived with only mild effects. No tests have been performed on humans yet, as outbreaks happen infrequently and are difficult to track. Quoting NPR: '[The drug] contains snippets of RNA derived from three of the virus' seven genes. That "payload" is packaged in protective packets of nucleic acid and fat molecules. These little stealth missiles attach to the Ebola virus' replication machinery, "silencing" the genes from which they were derived. That prevents the virus from making more viruses.

Read more: Slashdot

Posted via email from jasper22's posterous

Crypto Soft CSP

|
Руководство программиста

Структура данного руководства

Описание API CryptoSPI
Основные типы данных Crypto Soft CSP
Примеры использования API CryptoSPI
Исходный код приложения примеров


Источники технической информации

Интерфейс Crypto Soft CSP соответствует спецификации Microsoft CryptoSPI. Для разработки приложений, использующих Crypto Soft CSP, можно работать с первоисточником - непосредственно с MSDN.

Использование возможностей, расширяющих Microsoft CryptoSPI, рассматривается в данном руководстве.

Расширение Microsoft CryptoSPI разаработано для реализации плагинной архитектуры Crypto Soft CSP, а также управления протоклированием его работы. Архитектура Crypto Soft CSP описывается в руководстве пользователя.

Read more: Crypto Soft

Posted via email from jasper22's posterous

IIOP.NET

|
IIOP.NET allows a seamless interoperation between .NET, CORBA and J2EE distributed objects. This is done by incorporating CORBA/IIOP support into .NET, leveraging the remoting framework.

IIOP.NET is released under the LGPL license.

IIOP.NET was born on May, 2 2003, and grew from a small experimental project to a stable and useful application, mostly thank to the great feedback and dedication of our growing user's community.

FEATURES

Tight coupling between distributed objects in .NET, CORBA and J2EE;
components on each platform can act in either client or server role.
Tranparency: existing servers can be used unmodified, without wrapping code or adapters.
Extensive coverage of CORBA/.NET type mappings.
Native integration in the .NET framework;
IIOP.NET is directly based on the standard remoting infrastructure.

Read more: IIOP.NET

Posted via email from jasper22's posterous

Creating a self-signed certificate in C#

|
For a personal project involving SSL, I wanted to create some certificates that could be used to authenticate the client and server to each other. Nothing fancy - self-signed is perfectly fine in this case since the client would have an actual copy of the server cert to use when validating the server, and having the cert on the filesystem is secure enough for the task. In any case, I was disappointed to find out that even with all of the other crypto and certificate support, .NET lacks support for this. I was also disappointed by how difficult it was to figure out how to do this.
CertCreateSelfSignCertificate sounds promising, but it ends up not being quite enough. It turns out that you have to do the following (as simple as I know how to make it, anyway):

  1. CryptAcquireContext(out providerContext, randomContainerName, null, PROV_RSA_FULL, CRYPT_NEWKEYSET)
  2. CryptGenKey(providerContext, AT_KEYEXCHANGE, CRYPT_EXPORTABLE, out cryptKey)
  3. CertStrToName(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, name, CERT_X500_NAME_STR, 0, dataBuffer, ref dataLength, 0)
  4. cert = CreateSelfSignCertificate(providerContext, blob(dataBuffer, dataLength), 0, KeyProviderInfo(randomContainerName, PROV_RSA_FULL, AT_KEYEXCHANGE), 0, startTime, endTime, 0)
  5. certificateStore = CertOpenStore("Memory", 0, 0, CERT_STORE_CREATE_NEW_FLAG, 0)
  6. CertAddCertificateContextToStore(certificateStore, cert, CERT_STORE_ADD_NEW, out storeCert)
  7. CertSetCertificateContextProperty(storeCert, CERT_KEY_PROV_INFO_PROP_ID, 0, KeyProviderInfo(randomContainerName, PROV_RSA_FULL, AT_KEYEXCHANGE))
  8. PFXExportCertStoreEx(certificateStore, pfxBlob, password, 0, EXPORT_PRIVATE_KEYS)
  9. Free everything.

In case anybody is interested, source code is attached and is free for use by anybody as long as you don't hold me or Microsoft liable for it -- I have no idea whether this is actually the right or best way to do this. Give it the X500 distinguished name, validity start and end dates, and an optional password for encrypting the key data, and it will give you the PFX file data. Let me know if you find any bugs or have any suggestions.

Read more: Where are we going, and what's with the handbasket?

Posted via email from jasper22's posterous

Howto: Make Your Own Cert With OpenSSL

|
20081230-220030.png?w=419&h=519

Ever wanted to make your own public key certificate for digital signatures? There are many recipes and tools on the net, like this one. My howto uses OpenSSL, and gives you a cert with a nice chain to your root CA.

First we generate a 4096-bit long RSA key for our root CA and store it in file ca.key:

openssl genrsa -out ca.key 4096

Generating RSA private key, 4096 bit long modulus
...................................................................................++
........................................................................++
e is 65537 (0x10001)
If you want to password-protect this key, add option -des3.

Next, we create our self-signed root CA certificate ca.crt; you’ll need to provide an identity for your root CA:

openssl req -new -x509 -days 1826 -key ca.key -out ca.crt

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:BE
State or Province Name (full name) [Berkshire]:Brussels
Locality Name (eg, city) [Newbury]:Brussels
Organization Name (eg, company) [My Company Ltd]:https://DidierStevens.com
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:Didier Stevens (https://DidierStevens.com)
Email Address []:didier stevens Google mail
The -x509 option is used for a self-signed certificate. 1826 days gives us a cert valid for 5 years.

Read more: Didier Stevens

Posted via email from jasper22's posterous

Creating your First Silverlight Client Application: Twitter and COM, of course

|
I'm creating some "create your first" videos for MSDN, and thought it would be useful to offer up a text version of the Out-of-Browser one in addition to the video. In this example, we'll build a simple Twitter Search client, using Silverlight out-of-browser mode. I'll also show how to use the Automation (IDispatch) API to load the search results into Microsoft Excel.
XAML

The XAML for this demo includes just a simple page with one button and a listbox. The button is there to retrieve the tweets, the listbox to display them. No data templates yet.

<UserControl x:Class="SilverlightApplication50.MainPage"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   mc:Ignorable="d"
   d:DesignHeight="300" d:DesignWidth="400"
            xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

   <Grid x:Name="LayoutRoot" Background="White">
       <Button Content="Get Tweets"
               Height="23"
               HorizontalAlignment="Left"
               Margin="12,12,0,0"
               x:Name="GetTweets"
               VerticalAlignment="Top"
               Width="75"
               Click="GetTweets_Click" />
       <ListBox x:Name="TweetList"
                Margin="12,41,12,12"/>
   </Grid>
</UserControl>

Read more: 10REM.NET

Posted via email from jasper22's posterous

Silverlight 4: Interoperability with Excel using the COM Object

|
Silverlight 4 has the capability of accessing the COM object using the COM API. You can access any program installed in your PC using those APIs in Silverlight. You can open Notepad, Word, Excel or Outlook from Silverlight application.

Here I will demonstrate you the step-by-step tutorial on opening an Microsoft Excel book followed by data sharing between the Silverlight application and the Excel Sheet. Here we will use a DataGrid which will load some customer information. Then we will pass the data to the Excel Sheet and then we will modify the data in the external application (i.e. inside the Excel sheet). You will see that, the modified data will reflect automatically to the Silverlight Application.


Table of Contents


- Introduction
- Prerequisite
- Getting Started
- Configuring Out-of-Browser settings
- Basic Design for Out-of-Browser appication
- “Export to Excel” event implementation
- “Export to Excel” Demo
- What Next?

Introduction


Silverlight 4 has the capability of accessing the COM object using the COM API. You can access any program installed in your PC using those APIs in Silverlight. You can open Notepad, Word, Excel or Outlook from Silverlight application. Here I will demonstrate you the step-by-step tutorial on opening an Microsoft Excel book followed by data sharing between the Silverlight application and the Excel Sheet. Here we will use a DataGrid which will load some customer information. Then we will pass the data to the Excel Sheet and then we will modify the data in the external application (i.e. inside the Excel sheet). You will see that, the modified data will reflect automatically to the Silverlight Application.

Read more: Kunal's Blog

Posted via email from jasper22's posterous

Git Source Control Provider

|
Visual Studio users are used to see files' source control status right inside the solution explorer, whether it is SourceSafe, Team Foundation Server, Subversion or even Mercurial. This plug-in integrates Git with Visual Studio solution explorer.

Read more: Visual Studio Gallery

Posted via email from jasper22's posterous

LLBLGen Pro v3.0 has been released!

|
After two years of hard work we released v3.0 of LLBLGen Pro today! V3.0 comes with a completely new designer which has been developed from the ground up for .NET 3.5 and higher. Below I'll briefly mention some highlights of this new release:

Entity Framework (v1 & v4) support
NHibernate support (hbm.xml mappings & FluentNHibernate mappings)
Linq to SQL support
Allows both Model first and Database first development, or a mixture of both
.NET 4.0 support
Model views
Grouping of project elements
Linq-based project search
Value Type (DDD) support
Multiple Database types in single project
XML based project file
Integrated template editor
Relational Model Data management
Flexible attribute declaration for code generation, no more buddy classes needed
Fine-grained project validation
Update / Create DDL SQL scripts
Fast Text-DSL based Quick mode
Powerful text-DSL based Quick Model functionality
Per target framework extensible settings framework
much much more...
Of course we still support our own O/R mapper framework: LLBLGen Pro v3.0 Runtime framework as well, which was updated with some minor features and was upgraded to use the DbProviderFactory system. Please watch the videos of the designer (more to come very soon!) to see some aspects of the new designer in action.

Read more: Frans Bouma's blog

Posted via email from jasper22's posterous

How to exploit Google docs

|
Now that google has removed the restriction on its documents, it is time for us to start exploiting it.

No need to upload your pictures in some free image webhosting websites where you wont be having the 100% surity of whether it might come up all time or you'l see a "bandwidth exceeded" message. Upload it to your own google account and with some tweak, we can link it directly in the webpage. You can do the same with Picasa, but you will have to create an album every time and it becomes kind of annoying to maintain it.

Same goes with the flash presentations as well. No need to host it to any unreliable free websites. Upload it to your own google document. Plus if you want any referring files you can very well upload it to Google Docs. Yes, there is a limit on the size per account but still 7+ GB will become handy for small and medium bloggers.

Ok, the steps are very very simple.
1. Login to http://docs.google.com. Sign in with your google id and password.
2. Click on upload from the left top and select "any" file type you want only restriction is it cannot exceed 100 MB. Do not forget to uncheck "Convert documents, presentations, and spreadsheets to the corresponding Google Docs formats" if you feel you dont want Google mess up your documents.
3. After you upload the file, select the file and click on Share and select "Get the link to share". You should be getting a link in a text bar as shown below

Read more: Technicalypto

Posted via email from jasper22's posterous