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

Session Service

| Thursday, November 11, 2010
Still 1 billion ASP pages all around the world: http://www.google.com/search?hl=en&q=filetype%3Aasp!

"Homelidays Session Service" makes it easier for developer to store the classic ASP session state into a Microsoft SQL Server database and to share it with ASP.NET.
It's developed in C++ for Classic ASP and in C# for ASP.NET.

Homelidays Session Service is live on http://www.homelidays.com

Storing the session state in an external storage (Microsoft SQL Server database):

Eases the migration from classic ASP to ASP.NET allowing a step by step migration;
Allows a Classic ASP site using "Session" to be state less.

Read more: Codeplex

Posted via email from .NET Info

Microsoft Office Word Add-in For MediaWiki

|
Microsoft Office Word Add-in For MediaWiki makes creating wiki pages from a Word document easy.

Instructions
  Microsoft Office Word Add-in For MediaWiki adds a MediaWiki option to the Save As dialog within Microsoft Word. To save a document as MediaWiki choose Save As from the Word File menu, select the new MediaWiki option from the type dropdown below the filename and then click Save. The original document will be unchanged.

Read more: Codeplex

Posted via email from .NET Info

IISLogAnalyzer

|
FileDownload.aspx?DownloadId=157808

IISLogAnalyzer

IISLogAnalyzer is a package of software’s for analyzing IIS Log files. Package includes WPF and Silverlight 4 clients build with Prism and C# and the server build using C#, EF4, WCF and data provider model. Project is based on my first Silverlight pratice project, that was build with Silverlight 3 Navigation template. The project will be updated to latest technologies.

Package will include:
- Server, that can be configured to read log data from IIS log files, SQL Server Database or from ODBC datasource
- Silverlight client, that can be used as a whole application or use some modules of it in web page
- WPF client to get more efficient use of logs

Read more: Codeplex

Posted via email from .NET Info

3Licenses: collect your 3rd party licenses

|
Motivation

The overwhelming majority of 3rd party licenses require the application that uses them to reproduce the license verbatim in an artifact that is installed with the application itself. For instance, the BSD license states the following.

“Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.”

Are you currently copying individual license.txt files "by hand" or are you including license text in your documentation with copy/paste? You can do much better with 3Licenses.

3Licenses

3Licenses is pronounced "free licenses".

Features
Integrates with ANT and Subversion.
Detects common license file names.
Automatically detects various license types.
Uses svn:externals to derive thirdparty product versions.
Outputs thirdparty license information into XML output.
Combines multiple thirdparty license outputs into one.
Transforms thirdparty license information into HTML with XSLT.
Highlights missing licenses.
Allows overriding of product names, versions and license types.
Coming soon: MSBuild Support.


Read more: Codeplex

Posted via email from .NET Info

How to create a Loading Animation / Spinner using jQuery

|
Many web applications have some kind of loading animation (aka spinner).

A loading animation is important to signal the user that the application is still doing something and the user should wait for an action to complete. This gets even more important when you use Ajax in your webapp.

Using the Ajax library jQuery it is very easy to create a loading animation that will be shown whenever an Ajax request is running.

First of all, you need an animated gif with a loading animation. You can pick a free gif and customize it at ajaxload.info.
Include a div containing the image in every page of your webapp. Typically, you will add this div to a layout file or header that you include in every page.

<div id="spinner" class="spinner" style="display:none;">
   <img id="img-spinner" src="spinner.gif" alt="Loading"/>
</div>

The attribute style=”display:none;” makes the div invisible when the page is loaded.

Read more: techscouting through the news

Posted via email from .NET Info

Flex 4 for Silverlight/.NET Developers. Part 1. Introduction

|
As readers of this blog probably know, my main occupation over the last couple of years was .NET (WPF/Silverlight/WP7) side of amCharts product line. If you are familiar with the product you know that it started as Adobe Flash product and now expanded into Adobe Flex world too. I always wanted to be able to understand first hand what’s going on in our Flash/Flex products but was delaying the dive into Adobe world time after time. Now I finally got an opportunity to do something with Flex and had no excuse to skip it once again.

I decided to give Adobe’s own video course titled “Flex in a Week” a try and finished “Day 1” at this point. From the first second I felt that I’m looking at everything through .NET (WPF/Silverlight) developer’s perspective and thought that I’m probably not alone at this and it could be useful for people like me to have some articles about Flex targeted at .NET developers. So here we go…

Disclaimer: I’m not leaving .NET or something like that. This is just a side project to widen my personal professional horizons and be in the loop of stuff happening in other parts of amCharts product family and RIA world.

Tooling
I won’t try to disprove the myth that developers working on MS stack are very dependent on tooling and start straight from the tools.

The Visual Studio equivalent in Flex 4 world is called Flash Builder (formerly Flex Builder). Here’s how it looks

Read more: <devblog>.ailon.org

Posted via email from .NET Info

5 things you didn't know about ... multithreaded programming

|
While few Java™ developers can afford to ignore multithreaded programming and the Java platform libraries that support it, even fewer have time to study threads in depth. Instead, we learn about threads ad hoc, adding new tips and techniques to our toolboxes as we need them. It's possible to build and run decent applications this way, but you can do better. Understanding the threading idiosyncrasies of the Java compiler and the JVM will help you write more efficient, better performing Java code.
In this installment of the 5 things series, I introduce some of the subtler aspects of multithreaded programming with synchronized methods, volatile variables, and atomic classes. My discussion focuses especially on how some of these constructs interact with the JVM and Java compiler, and how the different interactions could affect Java application performance.

1. Synchronized method or synchronized block?

  You may have occasionally pondered whether to synchronize an entire method call or only the thread-safe subset of that method. In these situations, it is helpful to know that when the Java compiler converts your source code to byte code, it handles synchronized methods and synchronized blocks very differently.
When the JVM executes a synchronized method, the executing thread identifies that the method's method_info structure has the ACC_SYNCHRONIZED flag set, then it automatically acquires the object's lock, calls the method, and releases the lock. If an exception occurs, the thread automatically releases the lock.

Read more: IBM

Posted via email from .NET Info

ASP.NET Mobile Device Detection and Redirection Made Easy

|
Hello Guys

With growing number of mobile devices today it is very important for mobile web development that we detect the right mobile device and redirect user to the mobile layout content automatically to have good user experience.

http://51degrees.codeplex.com is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device.

You can very easily perform auto mobile redirection without updating any of your existing ASP.NET website pages by just updating your web.config as shown in sample below.

In this example MobileDeviceManufacturer is used as the property. Both WURFL capabilities and ASP.NET Browser properties can be used with the property attribute. If none of the locations match and the requesting device is a mobile device then the mobileHomePageUrl will be used

<em><fiftyOne>
   <redirect firstRequestOnly="true"
             mobileHomePageUrl="~/Mobile/Default.aspx"
             timeout="20"
             devicesFile="~/App_Data/Devices.dat"
             mobilePagesRegex="/(Apple|RIM|Nokia|Mobile)/">

     <locations>
        <location url="~/Apple/Default.aspx">

<add property="MobileDeviceManufacturer" matchExpression="Apple"/>
        </location>

       <location url="~/RIM/Default.aspx">

Read more: Microsoft ASP .NET Forum

Posted via email from .NET Info

If You Use BackgroundWorker in .Net, Make Sure You Wrap Your Worker Method In Try (or risk missing the exception thrown)

|
So, just a short post in case someone runs into the same problem I had today that cost me about 2 hours using Visual Studio 2010.  Basically, if you are using the BackgroundWorker in a windows app (with visual studio) and find that the method is not finishing and seemingly not throwing exceptions, maybe it actually is and you are missing it.
That is, if you have code like this:

private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
   backgroundWorker1.ReportProgress(0,"starting...");
   for (int i = 0; i < 10;i++ )
   {
       if (i > 5)
       {
           throw new ApplicationException("any error here");
       }
       backgroundWorker1.ReportProgress(i, "working...");
   }
}

and you run it in the debugger, it will not stop by default when the exception is thrown (like it would in single threaded code).

Read more: PeterKellner.net

Posted via email from .NET Info

BigMemory is out! Garbage Collection RIP

|
I'm sure like many of you, I tend to browse DZone for interesting articles/blog posts. As a guy who works on Java server-side software, articles related Garbage Collection always catches my eye. Today while browsing on DZone I came across this article on Garbage Collection tuning.

Halfway through reading the article I realized the irony: I'm reading a pretty well written article on how to tune your Java Garbage Collector on the same day Terracotta announced GA for our BigMemory product. As I spelled out here and here BigMemory makes the need for tuning unnecessarily. And if your talking about Java Heaps large; GC Tuning? Forgetaboutit!

Read more: Javasmith

Posted via email from .NET Info

Creating a Custom Search Screen in Visual Studio LightSwitch

|
While I was on my speaking trip in Europe a couple folks asked me how they could create their own search screen instead of using the built-in search functionality that LightSwitch provides. Basically they wanted the search to come up blank until a user entered specific search criteria and they only wanted to search on a specific field. In this post I’ll explain a couple options you have that allow you to tweak the default search screens and then I’ll show you how easy it is to build your own. Let’s get started!

Creating a Search Screen

Creating search screens in LightSwitch is really easy – it takes about 5 seconds once you have your table defined. You just describe your data, create a new screen and then choose the “Search Screen” template. Take a look at this video here: How Do I: Create a Search Screen in a LightSwitch Application?

For instance, say we have a Patient table that we’ve created in LightSwitch (if you don’t know how to create a table in LightSwitch see this video):

Posted via email from .NET Info

Apache Hadoop: Best Practices and Anti-Patterns

|
Apache Hadoop is a software framework to build large-scale, shared storage and computing infrastructures. Hadoop clusters are used for a variety of research and development projects, and for a growing number of production processes at Yahoo!, EBay, Facebook, LinkedIn, Twitter, and other companies in the industry. It is a key component in several business critical endeavors representing a very significant investment and technology component. Thus, appropriate usage of the clusters and Hadoop is critical in ensuring that we reap the best possible return on this investment.

This blog post represents compendium of best practices for applications running on Apache Hadoop. In fact, we introduce the notion of aGrid Pattern which, similar to a Design Pattern, represents a general reusable solution for applications running on the Grid.

This blog post enumerates characteristics of well behaved applications and provides guidance on appropriate uses of various features and capabilities of the Hadoop framework. It is largely prescriptive in its nature; a useful way to look at this document is to understand that applications that follow, in spirit, the best practices prescribed here are very likely to be efficient, well-behaved in the multi-tenant environment of the Apache Hadoop clusters, and unlikely to fall afoul of most policies and limits.

This blog post also attempts to highlight some of the anti-patterns for applications running on the Apache Hadoop clusters.

Overview

Applications processing data on Hadoop are written using the Map-Reduce paradigm.

A Map-Reduce job usually splits the input data-set into independent chunks, which are processed by the map tasks in a completely parallel manner. The framework sorts the outputs of the maps, which are then input to the reduce tasks. Typically both the input and the output of the job are stored in a file-system. The framework takes care of scheduling tasks, monitoring them and re-executes the failed tasks.

Read more: Yahoo developer network

Posted via email from .NET Info

100 отличных бесплатных новых XHTML шаблонов, сделанных в 2010 году

|
Представляю вашему вниманию действительно новые XHTML шаблоны, сделанные, в основном, в 2010 году. Эти шаблоны могут реально помочь, если вы решите создать сайт, используя шаблонное решение. Все шаблоны разных стилей и тематик сделаны очень профессионально. Можете подыскать подходящий шаблон в минималистическом или высокохудожественном, многослойном стиле для любого проекта: блога, корпоративного сайта, портфолио или интернет-магазина. В общем, отборный свежачок в одном месте. Наслаждайтесь!

Внимание: все ссылки с демонстрацией шаблонов откроются в новом окне. Ссылки для скачивания по возможности — прямые. Если прямую ссылку на скачивание шаблона поставить не возможно, я ставлю на страницу, с которой можно его скачать, ищите на ней кнопку «Download». На момент написания статьи все шаблоны были бесплатными. Если вдруг какой-нибудь шаблон станет не доступен для скачивания без оплаты, дайте мне знать, я его удалю.

1. Шаблон «Aquatic»

Aquatic-free-xhtml-templates.jpg

Read more: Efimov Victor

Posted via email from .NET Info

The C# Pragma Directive

|
Using the #paragma directive we can supress warning messages for specific code segments. The following short video clip shows that.

Read more: Life Michael

Posted via email from .NET Info

Database Testing Links

|

Discovering race conditions using PostSharp

|
Since the beginning of computer programming one of the problem that always baffled software developers was how to make sure that their code would run properly once threading has been introduce to the application. I’ve been experimenting with PostSharp for a couple of weeks and I thought that perhaps I can use it to discover multi threading issues in my code.

But first - Can you spot the problem with the following class:

public class UniqueIdFactory {
  private int counter = 0;

  public int GetNext() {
     var result = counter++;

     return result;
  }
}

Calling GetNext at the same time there is a chance that both thread would receive the same result. Fixing this issue is simple – just add Lock around counter++ or better yet use the Interlocked class. Obviously this is a simple easy to understand and debug example – in a real world project you just can’t go around adding lock to every place you happen change a variable’s value.

What I came up with is a simple attribute that checks that a specific method or methods are not running on multiple threads at the same time.

Read more: Helper Code

Posted via email from .NET Info

Using Silverlight TreeView to Display BI Dimension

|
Introduction

In business intelligence (BI) dimensions provide a natural way to browse business measures, such as sales volume, profit, etc. For example, information consumers might want to view sales volume broken down by Product Dimension Hierarchy and have an ability to drill from its top level, let’s say, Category to the bottom or leaf level that might be called Item. In our case drilling is possible due to structure of the Product Dimension Hierarchy that consists of two levels, Category and Item. The entities of each level are called dimension members. Here are some examples of the Category level members: Beverages and Produce. Examples of the leaf level members could be Chai and Pears.

In BI applications dimensional hierarchies are often displayed using TreeView control that offers convenient way to navigate the hierarchies and filter the data displayed by other controls.

In this post I’ll show you how to

Create a view out of a normalised dimensional hierarchy (snowflake schema) represented by two tables, i.e. Category and Product tables, and
Populate a Silverlight TreeView control from a dimension table.
If you would like to follow me, you need to download the Northwind database from here.

Step 1: Building the TreeView Source View

Open the SQL Server Management Studio and create the following view

Read more: Codeproject

Posted via email from .NET Info

Microsoft(R) SQL Server(R) code-named 'Denali' - Community Technology Preview 1 (CTP1)

|
Overview
SQL Server code-named 'Denali' helps empowers organizations to be more agile in today’s competitive market. Customers will more efficiently deliver mission-critical solutions through a highly scalable and available platform. Industry-leading tools help developers quickly build innovative applications while data integration and management tools help deliver credible data reliably to the right users and extended managed self-service BI capabilities enable meaningful insights.

With SQL Server code-named 'Denali' customers will benefit from the following added investments:
Enhanced mission-critical platform: A highly available and scalable platform designed to with greater flexibility, lower TCO, ease of use, and the performance required by the most mission-critical applications.
Developer and IT Productivity: New additional tools will help developers build innovative applications with reduced time-to-market while IT professionals benefit from greater operational control and ease of use.
Pervasive Insight: Stunning new managed self-service experiences for end users and holistic data integration and management tools will help deliver consistent, credible data to the right users at the right time.

To read about what is new in SQL Server code-named 'Denali' - Community Technology Preview 1 (CTP1) click here.

The SQL Server® Privacy Statement is also available for your review here.

Read more: MS Download

Posted via email from .NET Info

SQL Server (2011) Code Name Denali – Release Date Nov 9 2010

|
 Microsoft just announced the release of the next version of SQL Server, code named Denali, at the PASS Summit in Seattle.  The Community Technology Preview (CTP) version, somewhat like an early alpha or beta release, is available for download now to MSDN members.  It’s available in both 32-bit and 64-bit versions, and it shows up as version 11.0.1103.9.

After installation, here’s what the launch screen looks like for SQL Server Management Studio, which gives away the first clue of changes:

Read more: Brent Ozar

Posted via email from .NET Info

Your debugging code can be a security vulnerability: Loading optional debugging DLLs without a full path

|
Remember, the bad guys don't care that your feature exists just for debugging purposes. If it's there, they will attack it.

Consider the following code:

DOCLOADINGPROC g_pfnOnDocLoading;

void LoadDebuggingHooks()
{
HMODULE hmodDebug = LoadLibrary(TEXT("DebugHooks.dll"));
if (!hmodDebug) return;
g_pfnOnDocLoading = (DOCLOADINGPROC)
              GetProcAddress(hmodDebug, "OnDocLoading");
...
}

HRESULT LoadDocument(...)
{
...
if (g_pfnOnDocLoading) {
  // let the debugging hook replace the stream
  g_pfnOnDocLoading(&pstmDoc);
}
...
}
When you need to debug the program, you can install the DebugHooks.dll DLL into the application directory. The code above looks for that DLL and if present, gets some function pointers from it. For illustrative purposes, I've included one debugging hook. The idea of this example (and it's just an example, so let's not argue about whether it's a good example) is that when we're about to load a document, we call the OnDocLoading function, telling it about the document that was just loaded. The OnDocLoading function wraps the IStream inside another object so that the contents of the document can be logged byte-by-byte as it is loaded, in an attempt to narrow down exactly where document loading fails. Or it can be used for testing purposes to inject I/O errors into the document loading path to confirm that the program behaves properly under those conditions. Use your imagination.

Read more: The old new thing

Posted via email from .NET Info

Client Templating with jQuery

|
Templating with jQuery

  • Introduction
  • What is jQuery
  • Prerequisite
  • jQuery Templating
  • Templates
  • An example
  • Nested Templates
    • Nested Templates
    • An example
  • Microsoft Announcements
  • Conclusion
  • Introduction:

    jQuery templating is becoming a new buzzword for the new Web applications. One cannot avoid jQuery in web applications. Currently most of the applications are using jQuery heavily. It provides very good look & feel and better performance.

    There are a lot of plugins are also available for jQuery, they provides really cool feature. We can provide a very new and trendy look and feel with the help of jQuery. Also, as we are making very rich application, performance is also becoming a key point for our applications. jQuery helps a lot in this regard also. We will be discussing mainly jQuery Templating in this article.

    What is jQuery:

    jQuery is a JavaScript library that works on top of the JavaScript. jQuery provides a very simple way for HTML document traversing, DOM manipulation, event handling, animating, and Ajax interactions for rapid web development. That could have been very complex while working with normal JavaScript.

    jQuery is becoming more and more popular day by day. Even it was integrated with VS2008 and also available with VS2010. jQuery is open source. Due to its features, Microsoft started to support jQuery team and also working with them, to provide better web based tools to their Clients.

    Prerequisite:

    jQuery library
    A plugin for templating
    JSON library
    jQuery already comes with VS2008/2010. But if you are working VS 2005 then you can download from the following link.
    Download jQuery

    To download plugin for templating feature, click here
    Relax guys!! you won't need this plugin after jQuery 1.5. This would integrated with the main library itself :)

    To download JSON library, click here

    Read more: Codeproject

    Posted via email from .NET Info

    Silverlight Data Template Selector using Managed Extensibility Framework

    |
    Sometimes it makes sense to have multiple types of views contained within a list or region. In WPF, a data template selector can help determine which template is used based on the data template, allowing a container to mix different types. It's not so straightforward with Silverlight because the DataTemplateSelector class does not exist.
    There have been some excellent articles on the web with simple workarounds for this, but they often involve some sort of dictionary or hard-coded selection process. What I wanted to do was provide an example that does several things:
    • Allows you to add new templates easily simply by tagging them with attributes,
    • Is design-time friendly, and
    • Handles dependencies in the templated views, if needed
    The target situation is a hypothetical social media feed that aggregates data from different types but shows them in a single list. This example mocks the data but should be sufficient to show how it could be done. Consider this screenshot which shows three different styles of presenting data in the list:

    Read more: C#er: IMage

    Posted via email from .NET Info

    SSH сервер для Windows

    |
      Тема создания своего личного прокси-сервера поднималась на "Путеводителе по интернету" давно. Зачем это нужно? Ну, допустим, в ситуации, когда вы находитесь в каком-то месте, где наложены жесткие ограничения на использование интернета. Чтобы посетить желаемые ресурсы, нужно искать прокси-сервер. Но зачем же пользоваться каким-то чужим, если в качестве прокси-сервера может выступать ваш домашний компьютер!

      Допустим также, что на работе вы подключены через корпоративный прокси-сервер. Тогда обычными http-прокси вы воспользоваться не сможете. Механизм обхода таких ограничений был описан в моей статье про обход прокси. Но дело в том, что для такого обхода вам нужно иметь прокси-сервер, вам нужно иметь доступ к какому-нибудь ssh-серверу. И опять, почему бы не использовать для этой цели компьютер, стоящий у вас дома?

      Возможно, эта статья для кого-то покажется высшим пилотажем, но, на самом деле все очень просто. Шаги по использованию такого сервера таковы:

    • Устанавливаете ssh-сервер на свой домашний компьютер (описано в этой статье);
    • Не забываете о том, что вам необходимо дома получить реальный IP-адрес; (обычно, это недорогая услуга у провайдера)
    • На компьютере, с которого вы собираетесь использовать интернет в обход ограничений настраиваете ssh-подключение с помощью программы putty и настраиваете свой браузер на работу с прокси (подробно описано в статье про ssh);
    • Если же тот компьютер уже работает через прокси, используете технологию обхода прокси (также подробно описано в статье по ссылке).
       Таким образом, чтобы осуществить искомое нам остается лишь научиться устанавливать ssh-сервер под Windows. Перейдем к описанию!
    Мы воспользуемся программой cygwin - имитацией Linux-среды под Windows. Отправляемся на сайт http://cygwin.com и скачиваем последнюю версию Cygwin (на момент написания статьи - 1.7.7). Запускаем установщик (и, конечно, нам понадобятся права администратора).

    Read more: Путеводитель по интернету

    Posted via email from .NET Info

    How To Create A Google Like Captcha Control In ASP.NET

    |
    Want to get that same great look that Google’s Captcha has? Check out how easy it is to set up the ASPxCaptcha control to get that same look and feel:

    gCaptcha_39BE84E5.gif

    How?

    Here’s 3 easy steps for the ASPxCaptcha:

    Set a CodeLength property to 10
    Set the ChallengeImage's BackgroundColor property to 'Transparent'
    Set the ChallengeImage's ForegroundColor property to '#43B468' (you can also dynamically change the ForegroundColor on PageLoad to get different text colors just like in Google's Captcha).
    Here’s the ASPX markup:

    Read more: DevExpress

    Posted via email from .NET Info

    How to read and write Excel files in C++ via ADO

    |
    Introduction

    Sometimes software developers need to export some data to Excel format or read some cells from Excel file. One way to do it without Excel automation is interaction with ADO. In this case Excel files are treated as database. This method doesn't require Microsoft Excel and quickly enough, but it doesn't support formatting and formulas.

    Connection strings

    There are two types of connection string. First for binary format (xls):

    Provider=Microsoft.JET.OLEDB.4.0;Data Source=data.xls;Extended Properties="Excel 8.0"

    Second for xml format (xlsx):

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=data.xlsx;Extended Properties="Excel 12.0 Xml"

    If input file doesn't have a header with column names then add ";HDR=NO" in extended properties.

    Writing

    First create a Connection object:

    TESTHR(pCon.CreateInstance(__uuidof(Connection)));
    TESTHR(pCon->Open(connStr, "", "", NULL));

    Afterwards create Command object and table. Note that name of table is name of sheet:

    Read more: Codeproject

    Posted via email from .NET Info

    Announcing the ASP.NET MVC 3 Release Candidate

    |
    This morning the ASP.NET team shipped the ASP.NET MVC 3 RC (release candidate). You can download it here.

    ASP.NET MVC 3 is a pretty sweet release, and adds a ton of new functionality and refinements.  It is also backwards compatible with ASP.NET MVC V1 and V2 – which makes it easy to upgrade existing apps (read the release notes for the exact steps to do so).  You can learn more about some of the great capabilities in ASP.NET MVC 3 from previous blog posts I’ve done about it:

    Posted via email from .NET Info

    MVVM Pattern in WPF: A Simple Tutorial for Absolute Beginners

    |
    Introduction

    As part of learning the MVVM pattern, I tried to search many sites and blogs and found most of them explained the pattern in a complicated way. After some research, I cracked the very basic steps in MVVM pattern, and here I am trying to write an MVVM tutorial for absolute beginners.

    I don’t think much more time or words need to be spend for explaining the various parts of MVVM and the relationship between MVVM and WPF. If you travel to the depths of WPF, you will realize that MVVM is the best suitable pattern for WPF (you might not understand the difference between these two).

    As a formal procedure, I am giving a simple diagram and definition for MVVM:

    mvvm.jpg

    Read more: Codeproject

    Posted via email from .NET Info

    TypeLoader

    |
    Project Description
    TypeLoader can achieve a vertical Japanese text processing such as WPF more easily.
    TypeLoader acquires the substitution table for vertical text processing reading the file of TrueType or OpenType directly.
    It's developed in Visual C# 2010 Express.

    Read more: Codeplex

    Posted via email from .NET Info

    Quick Tip: change text on the Clipboard before you paste CTRL + v

    |
    This quick tip describes how text from the Clipboard can be modified before the user inserts the text with CTRL + V in a TextBox

    Notes

    KeyDown event of a TextBox checks whether the user has pressed the key combination CTRL + V. If this is the case, the text from the Clipboard using the method assigns Clipboard.GetText() of a private variable. It follows a check whether the text in the Clipboard is an empty string. If not, is a modification of the text from the Clipboard intercepted. A substring is formed in the example above. Finally, the modified text using the method assigns SetText() of Clipboard.

    When the user releases the key combination, the text on the Clipboard is now from the modified text and insert this text.

    Read more: SilverLaw

    Posted via email from .NET Info

    Using the Device Panel

    |
    Unlike desktop and web applications, your Windows Phone applications can be viewed in multiple orientations, can be run in either a Light or Dark theme, and can be customized using various accent colors. Designing across all of these combinations of orientations and looks may seem like a daunting challenge.

    While I am not going to dismiss the effort it would take for you to take all of those cases into account when designing your application, there are some features in Expression Blend that can help you out. The one I am going to focus on in this article is the Device Panel:

    devicePanel.png

    The Device Panel is a one-stop shop where you can preview inside Expression Blend what your application will look like in the various orientation and theme combinations a user may have set. In this short article, you will learn how to use the various features the Device Panel exposes to make your life easier.

    Getting Started
    Make sure you have everything up and running to do Windows Phone development. Once you are setup, go ahead and launch Expression Blend and create a new Windows Phone application.

    Read more: kirupa.com

    Posted via email from .NET Info

    Welcome to the EF FAQ

    |
    This is a collection of frequently asked questions (and answers) about the Entity Framework (a .Net-based Object-Relational Mapping framework from Microsoft).

    You can always find the latest version of the FAQ at http://www.ef-faq.org. These questions and answers were culled from a number of existing blog and forum posts. No doubt there is a lot more data that belongs here which is where you come in. Contributions are very welcome! Please go to the EF-FAQ codeplex project for more information on how you can help us keep this a relevant, valuable resource.

    Read more: Entity Framework FAQ

    Posted via email from .NET Info

    DHS/FEMA State Cybersecurity Training

    |
    052708-144605.jpg

    The Adaptive Cyber-Security Training Online (ACT-Online) courses are now available on the TEEX Domestic Preparedness Campus. This DHS/FEMA Certified Cyber-Security Training is designed to ensure that the privacy, reliability, and integrity of the information systems that power our global economy remain intact and secure.

    The 10 courses are offered through three discipline-specific tracks targeting everyday non-technical computer users, technical IT professionals, and business managers and professionals.

    These courses are offered at no cost and students earn a DHS/FEMA Certificate of completion along with Continuing Education Units (CEU) at the completion of each course.

    Posted via email from .NET Info

    Analysis Of The Microsoft Office 2010 Binary Planting Bugs

    |
    Keeping binary planting bugs out of 120 million lines of code

    In the course of the ongoing binary planting research, our company has discovered five binary planting bugs in Microsoft Office 2010: two in Word 2010, one in PowerPoint 2010 and one in Excel 2010. We notified Microsoft about the PowerPoint bug on July 20th (about 110 days ago), but subsequently this bug was also found and published by other researchers.

    Yesterday Microsoft released security updates for Microsoft Office 2010 (here, here) resolving this issue. They acknowledged our researcher for the find, and, not unimportantly, upgraded the severity rating to "critical" (from their original assessment of binary planting bugs as "important"). In light of our current research, where we're already able to exploit binary planting bugs with as little user assistance as visiting a web page and clicking twice in arbitrary locations, the highest severity rating is quite accurate.

    Microsoft didn't just fix the PowerPoint binary planting bug we reported; they also fixed two other binary planting issues we knew about in Word 2010 and Excel 2010 (although you won't find these mentioned in their bulletin). Since these are the first binary planting bugs fixed by Microsoft, they deserve a bit of attention. Let's start with some technical details:

    The three binary planting issues all had a common source: the library called mso.dll (installed in %ProgramFiles%\Common Files\Microsoft Shared\office14\). This library made an unsafe call to LoadLibrary("pptimpconv.dll") in PowerPoint, LoadLibrary("wdimpconv.dll") in Word and LoadLibrary("xlimpconv.dll") in Excel. These DLLs, however, did not exist on Windows computers, and were thus loaded from the current working directory. The exploitation of such bugs is simple: place an Office file alongside a malicious DLL with the right name somewhere where the user will be able to access it (e.g., DVD, USB key, local drive, local share or remote WebDAV share), and get the user to open the document. For the PowerPoint bug this was it; for Word and Excel however, the Office Protected View, if it decided to kick in, actually provided an additional layer of security as these DLLs were only loaded if the user decided to enable editing by clicking the button in the message bar.


    Read more: across

    Posted via email from .NET Info

    ASP.NET Web Application: Publish/Package Tokenizing Parameters

    |
    Today I just saw a question posted on stackoverflow.com asking Why are some Web.config transforms tokenised into SetParameters.xml and others are not? Let me give some background on this topic for those who are not aware of what the question is.

    With Visual Studio 2010 when you package your application using the Build Deployment Package context menu option, see image below.

    Posted via email from .NET Info

    XSSer v1.0 aka "The Mosquito" released

    |
    XSSer v1.0 -official- aka "The Mosquito" released.
    http://downloads.sourceforge.net/xsser/xsser-1.0.tar.gz

    Have this new implementations:

    - Added "final remote injections" option
    - Cross Flash Attack!
    - Cross Frame Scripting
    - Data Control Protocol Injections  
    - Base64 (rfc2397) PoC
    - OnMouseMove PoC
    - Browser launcher
    - Code clean
    - Bugfixing
    - New options menu
    - Pre-check system
    - Crawler spidering clones
    - More advanced statistics system
    - "Mana" ouput results

    Read more: XSSer

    Posted via email from .NET Info

    How to move the Firefox or Chrome cache to a RAM disk and speed up surfing by 20% or more

    | Wednesday, November 10, 2010
    dataramramdiskp1.jpg

    If you're old enough, you probably remember what a RAM disk is. Back in the olden days, to squeeze every last bit of juice out of your computer (usually for the purpose of playing Doom), you could load a program into a RAM disk -- a virtual drive made out of spare RAM. As I'm sure you know, RAM is a lot faster than your hard drive

    Fast forward to today, and most computers have a lot of spare RAM. Unless you're editing large multimedia files, you're probably using only a fraction of your RAM. Why don't we use a little bit of it to speed up our surfing of the Web?

    Browsers save a lot of data to the hard drive. Every image, so that you don't have to download it every time you visit a page, is saved to the hard drive. That's when you experience the 'grind' of loading (or reloading) a tab that you haven't looked at recently -- the browser is loading data from the hard drive.

    With a RAM disk, you can make the browser always load from memory. This speeds up the entire browsing experience by a significant margin. The browser starts in a flash, switching between tabs feels faster, and page load times can be reduced by 20% or more!

    To get started, you need Dataram's excellent RAMDisk software. It's free, unless you want to create RAM disks over 4GB in size (which you really don't need to do).

    Read more: DownloadSquad

    Posted via email from .NET Info

    Open source Kinect camera driver now available for download

    |
    This is a little confusing, but it looks like there's another Kinect driver out in the wild, and this one is actually available for download. The folks at NUI Group, who posted results first, are working on an SDK and Windows driver for all the capabilities of the device, which they plan to release as open source once their $10k donation fund is filled up. Meanwhile, hacker Hector Martin has performed a quick and dirty hack of his own (three hours into the European launch, no less) and has released his results and code into the wild. Sure, pulling data from the IR and RGB cameras and displaying it is a lot different than actually making sense of it, but if you're just looking for a way to plug your Kinect into your computer and squeeze some fun visuals out of it (and you're smart enough to deal with some pretty raw code), it looks like Hector is your man of the hour. Peep his video proof after the break.

    Read more: Engadget

    Posted via email from .NET Info

    $2,000 Bounty For Open Source Xbox Kinect Drivers

    | Monday, November 8, 2010
    Open source hardware company Adafruit Industries is offering a $2,000 bounty for the first person or group to upload driver code and examples under an open source license to GitHub for the Xbox Kinect released yesterday. The Kinect sensor outputs video at a frame rate of 30Hz, with the RGB video stream at 32-bit color VGA resolution (640×480 pixels), and the monochrome video stream used for depth sensing at 16-bit QVGA resolution (320×240 pixels with 65,536 levels of sensitivity). The open hardware group would like to see this camera used for education, robotics and fun outside the Xbox

    Read more: Slashdot

    Posted via email from .NET Info

    Kinect with nightshot

    |
    This is the infrared projection kinect uses to see you and your environment. You can try it with any camera using nightshot mode.

    Read more: Youtube

    Posted via email from .NET Info

    A JavaScript Gameboy Emulator, Detailed In 8 Parts

    |
    JavaScript has shed its image of being a limited language, tied to DOM manipulation in a browser; in recent years, new engines and frameworks have given JS a reputation as a language capable of bigger things. Mix this in with the new elements of HTML5, and you have the capacity to emulate a game console or other system, with full graphical output. This series of articles looks in detail at how an emulator is written in JavaScript, using the example of the Gameboy handheld: starting at the CPU, and (as of part 8) running a copy of Tetris

    Read more: Slashdot

    Posted via email from .NET Info

    Likelihood of a computer issue being solved by...

    |

    The Queen Joins Facebook

    |
    The Queen is set to have an official presence on Facebook when a British Monarchy page launches on the internet-based social networking site. Buckingham Palace says it is not a personal profile page, but users can 'like' the service and receive updates on their news feed. The Queen has reportedly embraced the web and sends e-mails. A British Monarchy Twitter feed is also available. The Facebook page is due to go live from Monday morning. The page will also feature the Court Circular, recording the previous day's official engagements.

    (The Facebook page is due to go live from Monday morning.)

    Read more: Slashdot

    Posted via email from .NET Info

    Kinect does hacker's bidding, but not for fortune or fame (video)

    |
    11-7-10-kinecthacked600.jpg

    Yes, Microsoft's Kinect has already been cracked, as you'll see on video after the break -- the motion-sensing depth camera now nods its head on command and displays real-time accelerometer data on one lucky hacker's PC. We tracked down the son-of-a-gun who did it -- as it happens, the same NUI Group member who hacked the PlayStation Eye in 2008 -- and found to our disappointment that he doesn't necessarily intend to unleash his new exploit on the world. The $2,000 prize Adafruit is presently offering for open-source Kinect drivers isn't his aim, though he does have big personal plans for the device, as he hopes to integrate it into his company's commercial visualization suite CL Studio Live. It seems that work is progressing fast, as he's already gotten video streams from both cameras to output to his computer, and he plans to upload a far more convincing video soon. Here's hoping he has a change of heart about sharing his rapid accomplishments.

    Read more: Engadget

    Posted via email from .NET Info

    Giveaway of the Day - Classic Start Menu Pro 3.8

    |
    Classic-Start-Menu-with-Aero_120.jpg

       Are you missing the Classic Start Menu in Windows 7? If so, you are not alone. We have developed this Classic Start Menu for you, and now you can easily change the unusable menu of Windows 7 to the well known classic start menu with Aero skin. Actually, you can use other skins too, not just the Aero one. Yet, with Aero, you make the Classic Start Menu look like a real part of Windows 7.

    Unique features:

    One-click launch helps you run programs faster.
    Use Classic Start menu as a starting point. You can add any folders to the menu, including special system folders, drives, or shortcuts, and get access to any point of your PC with few clicks from one single place.

    Read more: Giveaway of a day

    Posted via email from .NET Info

    Recording of webinar '10 Silverlight Tips' by Gill Cleeren

    |
    Watch a recording of Gill Cleeren's webinar '10 Silverlight Tips' delivered on October 27th, 2010.

    The 10 Silverlight Tips covered by Gill were:

    Behaviors
    PathListBox
    Binding tricks
    INavigationContentLoader
    Debugging services
    Securing service communication
    Leveraging ASP.NET membership
    Uploading and downloading files
    Downloading functionality on-demand
    Bag of tricks  

    Read more: Silverlight Show

    Posted via email from .NET Info

    Аспектно-ориентированное программирование, Mono.Cecil, MSIL, кодогенерация, изменение сборок и многое другое. Статья 1

    |
    В данном цикле статей я расскажу про MSIL, кодогенерацию в .NET, изменение существующих сборок, Mono.Cecil, аспектно-ориентированное программирование и многое другое (если конечно вам это будет нужно:) ). Все это будет сопровождаться работающими примерами, так как я считаю, что код - это лучший способ донести идею. Это моя первая статья вообще, и на GotDotNet в частности, так что любые комментарии приветствуются. Цикл будет продолжаться, если это кого-либо заинтересует. Итак, начнем.
    Многие .NET разработчики знают, что для доступа к объектам чужой сборки можно использовать Reflection. С помощью типов из System.Reflection мы можем получить доступ ко многим объектам .NET сборки, просмотреть их метаданные, и даже использовать те объекты, доступ к которым ограничен (например, private методы чужого класса). Но Reflection в .NET очень ограничен, и главная причина этому - данные, с котороми вы работаете через Reflection все еще считаются кодом. Таким образом, вы, к примеру, можете получить CodeAccessSecurity exception, если сборка, к которой вы пытаетесь применить Refelection, запрещает это. По этой же причине Reflection работает довольно медленно. Но наиболее важным для дальнейшего является то, что стандартный Reflection не позволяет изменять существующие сборки, только генерировать и сохранять новые.

    Качественно иной подход предлагает бесплатная библиотека Mono.Cecil, поставляющаяся вместе с исходным кодом. Главное отличие Mono.Cecil от Reflection в том, что она рассматривает сборку как набор инструкций MSIL (как поток байт) , а не как некий код. Таким образом, с помощью Mono.Cecil можно как угодно изменять MSIL код имеющейся сборки.

    Сразу рассмотрим на примере использование возможностей Mono.Cecil. Предположим, у нас есть консольное приложение без исходного кода, в котором есть тип Program. У нас нет доступа к исходному коду, но мы хотим, чтобы данное приложение при вызове каждого метода выводило,, на консоль некоторое сообщение. Для этого напишем собственное консольное приложение. В качестве аргумента при запуске будем передавать путь к целевому приложению:

    using Mono.Cecil;
    using Mono.Cecil.Cil;

    class Program
    {
     static void Main(string[] args)
     {
       if (args.Length == 0)
         return;
       string assemblyPath = args[0];
       // считываем сборку в формате Mono.Cecil
       var assembly = AssemblyDefinition.ReadAssembly(assemblyPath);
       // получаем метод Console.WriteLine, используя стандартные методы Reflection
       var writeLineMethod = typeof(Console).GetMethod("WriteLine", new Type[] { typeof(string) });
       // создаем ссылку на метод, полученный Reflection, для использования в Mono.Cecil
       var writeLineRef = assembly.MainModule.Import(writeLineMethod);
       foreach (var typeDef in assembly.MainModule.Types)
       {
         foreach (var method in typeDef.Methods)
         {
         // Для каждого метода в полученной сборке
         // Загружаем на стек строку "Inject!"
         method.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Ldstr, "Inject!"));
         // Вызываем метод Console.WriteLine, параметры он берет со стека - в данном случае строку "Injected".
         method.Body.Instructions.Insert(1, Instruction.Create(OpCodes.Call, writeLineRef));
         }

    Read more: gotDotNet

    Posted via email from .NET Info

    PayPal Helper for WebMatrix

    |
    Introduction
       Microsoft WebMatrix provides an easy way to get started with web development, and together with new Razor syntax for ASP.NET Web Pages it includes everything you need to get your web site up, running and integrated with many other sites and networks, in a short period of time. The WebMatrix helpers are designed to make your life easier when creating web sites. They provide you a simple and consistent way of performing common web development tasks that otherwise would require a great deal of custom coding. With a few lines of code you should be able to secure your web site using membership, store information in Windows Azure Storage, integrate your site with Facebook, among others things.

    The PayPal helper for WebMatrix allows you to integrate PayPal payments within your WebMatrix website or e-commerce application. With a few lines of code, you’ll enable your Web site customers to click on a payment button to pay for their purchases with their PayPal accounts.

    The helper supports both the PayPal Button Manager API and the Adaptive Payments API. Using the Button Manager API you will be able to create (and manage) PayPal buttons like Add To Cart or Buy Now, that will let your customers purchase single or multiple items, among other things. With the Adaptive Payments API you can process from your WebMatrix web site PayPal transactions, in both simple and complex scenarios. You can build Web applications that handle payments, preapprovals for payments, and refunds.

    Get Started in 60 seconds
    1. Download the assemblies for the PayPal Helper (PayPal.dll, paypal_base.dll, log4net.dll)
    2. Create a new website or template in WebMatrix
    3. Create a bin folder off the root
    4. Copy and paste the assemblies into the bin folder
    5. Download the Documentation for instructions on using the helper
    6. You're done, start using PayPal for payments!

    Read more: Codeplex

    Posted via email from .NET Info

    Мифы и заблуждения насчёт CLR и .NET

    |
    Последнее время на популярно-технических форумах я часто встречаю ожесточённые споры приверженцев и противников .NET. Эти споры, как правило, начинаются из-за недоразумения, и заканчиваются жестким троллингом, беседами “за жизнь” и сравнением радиусов и удельных плотностей материала различных сферических коней. Обе стороны силятся доказать и аргументировать, но ни одна не хочет посмотреть на предмет спора другими глазами. Хабрахабр не исключение, увы.

    Накалу страстей такой беседы позавидовали бы религиозные фанатики. Единственное, что спасает противников от крестовых походов друг на друга, вооружившись вилами и LangSpec’ами — то, что они разделены интернетом.

    Так жить нельзя, господа. Мне захотелось исправить эту ситуацию, и выступить с одной из сторон. Этим постом я попробую нанести сообществу непоправимую пользу и разобраться с мифами, на обсуждение которых, а не на взаимное членовредительство, к сожалению, и уходят силы спорщиков. А так как я в своё время перелез с C++ на C# и всё вокруг него, то я буду развенчивать негативные мифы, прибавлять позитива и всячески приукрашивать действительность — а как без этого. И — заметьте — это обойдется совершенно бесплатно для M$. Ну а сделать я это хочу в формате Q&A.


    #. C# и CLR — это такая VM, т.е. интерпретатор, а, значит, очень медленно и печально. Мне нужно, чтобы было быстро, очень быстро!

    Я не буду рассказывать тут, чем компиляция отличается от интерпретации. Просто хочу заметить вот что: джентльмены, недавний опрос на Хабрахабре показал — большинство разработчиков так или иначе используют “управляемые” языки, которые компилируются не в нативный код, а в байт-коды, исполняемые интерпретаторами — непосредственными или компилирующего типа. Всякие TraceMonkey, LuaJIT, YARV как раз примеры для последней классификации. Это означает, что переход на другую платформу сходной архитектуры заведомо не сделает приложение медленнее. В этом смысле беспокоиться не о чем.

    Однако, CLR — это sort of virtual machine, но это не интерпретатор. Еще раз повторюсь: MS.NET это НЕ ИНТЕПРЕТАТОР БАЙТКОДА. Специальный компилятор JIT постепенно преобразует байткод программы в нативный код, примерно такой же, который выдаёт компилятор C++. Текущая реализация CLR — MS.NET и Mono гарантируют, что ЛЮБОЙ код, который будет исполняться, преобразуется в нативный код. При этом для десктопов утверждение еще сильнее: любой код будет откомпилирован только один раз. Причём то, что он компилируется “на лету”, теоретически позволяет более оптимально использовать особенности конкретного процессора, а значит, сильнее соптимизировать код.

    Более того, сравнение абсолютных цифр на бенчмарках показывает, что CLR оказывается на порядки эффективнее, чем популярные скриптовые языки типа Javascript и Ruby, тоже использующие технологию JIT.

    #. Языки со сборкой мусора отстают от языков типа C++ по скорости.

    Верно, тут вы весьма близки к истине. Но, как и любой холиварщик, немного не договариваете. Правильно фраза будет звучать так: “корректно написанное и целиком вручную оптимизированное нативное приложение без ошибок, использующее специальные методики управления памятью, будет быстрее, чем приложение с автоматической сборкой мусора”.

    Read more: Habrahabr.ru

    Posted via email from .NET Info

    What is Silverlight for Windows Embedded for C++ ?

    |
    image.axd?picture=image_thumb_134.png

    Is there a  version of Silverlight that works with embedded  systems and works with C++ native code ? Survey says yes..

    Silverlight for Windows Embedded is a native (C++ based) user interface (UI) development framework for Windows Embedded Compact powered devices and is based on Microsoft Silverlight 3.

    Silverlight for Windows Embedded offers a comprehensive C++ API that is fully-compatible with XML-based declarative markup and has no dependency on the .NET Framework.
    With Silverlight for Windows Embedded, embedded OEMs can either completely predefine the visual appearance, effects, and behavior in source XAML, or use the C++ programming model to create or customize the UI appearance and functionality for the shell and applications.

    Developers can use the Silverlight C++ API to load and display an existing XAML UI, implement event handling for the XAML elements, or customize the UI at run-time by adding new elements or changing the visual appearance to respond to factors present at run-time.

    Read more: XAML Refugees Design Blog

    Posted via email from .NET Info

    WCF – TCP with UserNameToken without Message Security

    |
    There was a project that I assisted with the WCF communications where they needed to allow the client to specify different credentials without being dependent on the windows account.

    The first thing that comes into mind is to use the UserNameToken technique to pass in the client credentials. The design instructed to use TCP as the transport and not use message security. Obviously, this technique has privacy and integrity issues where there isn’t any encryption nor signing, but that was their decision because it wasn’t an issue in the purpose of the project.

    Well, this setting isn’t as trivial as you would expect.
    The default form of the NetTcpBinding allows you to use UserNameToken only as part of message security and forces you to use a certificate to enable that message security.

    I ended up setting them a CustomBinding which provides the scenario they needed.

    Service Side

    Configuring the Service Host -

    _host = new ServiceHost(typeof(Service));
    _host.AddServiceEndpoint(typeof(IService), Config.ServiceBinding, Config.ServiceAddress.Uri.AbsoluteUri);

    _host.Credentials.UserNameAuthentication.UserNamePasswordValidationMode = UserNamePasswordValidationMode.Custom;
    _host.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator = new CustomUserNameTokenValidator();

    _host.Open();


    Read more: Zuker On Foundations

    Posted via email from .NET Info

    Garbage Collector Basics and Performance Hints

    |
    Summary: The .NET garbage collector provides a high-speed allocation service with good use of memory and no long-term fragmentation problems. This article explains how garbage collectors work, then goes on to discuss some of the performance problems that might be encountered in a garbage-collected environment. (10 printed pages)

    Applies to:
      Microsoft® .NET Framework

    Contents

    Introduction
    Simplified Model
    Collecting the Garbage
    Performance
    Finalization
    Conclusion

    Introduction

    In order to understand how to make good use of the garbage collector and what performance problems you might run into when running in a garbage-collected environment, it's important to understand the basics of how garbage collectors work and how those inner workings affect running programs.

    This article is broken down into two parts: First I will discuss the nature of the common language runtime (CLR)'s garbage collector in general terms using a simplified model, and then I will discuss some performance implications of that structure.

    Simplified Model

    For explanatory purposes, consider the following simplified model of the managed heap. Note that this is not what is actually implemented.

    IC112504.gif

    Read more: MSDN

    Posted via email from .NET Info

    Creating a Simple Action

    |
    In a few previous tutorials, you learned all about Behaviors and how to use a behavior that is provided out of the box by Expression Blend. You find a behavior in your Assets Library, drag/drop it onto something, tweak a few properties, and (like magic!) you are done and everything just works.

    There will be times, though, where you will not find a built-in behavior to suit what you are trying to do:

    listOfBehaviorsWP7.png

    In those dark, uncertain times, you will basically need to write your own behavior. Fortunately, as you will see shortly, that isn't something that is too difficult. The Behaviors functionality is made up of three components - Behavior, Action, and Trigger. Each component does something pretty unique, so this tutorial is focused on the most common of them, the Action.

    What is an Action?
      Mundane things you face in in real life and mundane things your applications face, in many ways, are not that much different. They all revolve around cause and effect. When I flip on a light switch, the light turns on. When I click on a button, a sound plays. When my application hits a certain time, it needs to close.

    Read more: kirupa.com

    Posted via email from .NET Info

    Ready for take-off? Top 10 things to check when you think you are done with your application.

    |
    Creating a new mobile platform has been an amazing ride, is not often that one has the opportunity to create and define a totally new experience from the ground up, especially one that will be in the hands of millions of users. An endeavor of that magnitude comes with many ups and downs.  Here is where a public space, like this one, comes handy.

    So far the response from the developer community has been amazing! The number of applications showing up on the Marketplace is growing by the hour.  However, creating new experiences on a brand new platform is not easy. Our team has been reviewing hundreds of applications.  And, we have assembled a list of the most common gotchas we have observed.

    Some of the issues are easy to fix.  Others are more complex and require more detailed explanations.  We will use this space to describe the issues we’ve seen, and offer some design advice that we hope will help you make your app even better.  Here’s our list of top ten areas of your app to consider while designing, or before you submit your app to the marketplace.

    • Start tiles and splash screens are your first impression… Make them great.
    • Make sure your buttons are visible even when the keyboard is displayed.
    • Build your application to respect theme and accent color changes.
    • Make sure your finger can hit its target and the text is readable.
    • Right layout alignment and information hierarchy are key.
    • Place your buttons well… Flying buttons, home buttons, and back buttons… Oh my!
    • Give feedback on touch and progress within your UI.
    • Embedding web content should be done with extreme caution.
    • Make your life easy.  Use our common controls, and use them right!
    • Understanding Pivots and Panoramic views. 

    Read more: Windows Phone

    Posted via email from .NET Info

    Creating a Metro UI Style Control

    |
    250px-WPZuneHub.jpg

    I set out to create a control that could help me build a Metro UI.  If you’ve used the Zune Software I’m sure you’ve noticed that when you enter a new section it animates in.  A typical animation floats in from the left while also fading in.  Lets dive into how we can create a ContentControl to accomplish this effect for us.

    In this demo I’m using the Silverlight Cosmopolitan Theme.  You can download this theme as well as a few others from Microsoft.  Read Tim Heuer’s blog post for more information.

    Download the sample project and source for this post: Metro Demo Source

    I’ll give our control the awesome name of MetroContentControl.  When the control loads and unloads we want to run some animations, so lets kick off two Visual States.  We’ll call them AfterUnloaded and AfterLoaded, which are the same Layout State names that the ListBox in Silverlight 4 uses.

    public class MetroContentControl : ContentControl
    {
       public MetroContentControl()
       {
           this.DefaultStyleKey = typeof(MetroContentControl);

           this.Loaded += MetroContentControl_Loaded;
           this.Unloaded += MetroContentControl_Unloaded;
       }

       private void MetroContentControl_Unloaded(
           object sender, RoutedEventArgs e)
       {
           VisualStateManager.GoToState(this, "AfterUnLoaded", false);
       }


    Read more:  joe.mcbride

    Posted via email from .NET Info

    Stunnel -- Universal SSL Wrapper

    |
    Stunnel is a program that allows you to encrypt arbitrary TCP connections inside SSL (Secure Sockets Layer) available on both Unix and Windows. Stunnel can allow you to secure non-SSL aware daemons and protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the encryption, requiring no changes to the daemon's code.
    The Stunnel source code is not a complete product -- you still require a functioning SSL library such as OpenSSL or SSLeay in order to compile stunnel. This means that stunnel can support whatever (and only) that which your SSL library can, without making any changes in the Stunnel code.

    The Stunnel source code is available under the GNU General Public License, meaning it is free to use in both commercial and non commercial applications as you see fit, as long as you provide source code (and any modifications) with the software. Your compiled Stunnel binary is 'restricted' by whatever license your chosen SSL library is under, however both OpenSSL and SSLeay are open source and similarly liberal in their licensing.

    Stunnel 3.24 and earlier signaling bug

    Stunnel 3.24 and earlier (as well as 4.0x x<4) does not properly handle SIGCHLD signals safely. Stunnel 3.26 is now available and fixes this problem.

    Read more: Stunnel

    Posted via email from .NET Info

    Debugging walkthrough: Diagnosing a __purecall failure

    | Sunday, November 7, 2010
    Prerequisite: Understanding what __purecall means.

    I was asked to help diagnose an issue in which a program managed to stumble into the __purecall function.

    XYZ!_purecall:
    00a14509 a100000000      mov     eax,dword ptr ds:[00000000h] ds:0023:00000000=????????
    The stack at the point of failure looked like this:

    XYZ!_purecall
    XYZ!CViewFrame::SetFrame+0x14d
    XYZ!CViewFrame::SetPresentation+0x355
    XYZ!CViewFrame::BeginView+0x1fe
    The line at XYZ!CViewFrame::SetFrame that called the mystic __purecall was a simple AddRef:

     pSomething->AddRef(); // crashes in __purecall

    From what we know of __purecall, this means that somebody called into a virtual method on a derived class after the derived class's destructor has run. Okay, well, let's see if we can find the object in question. Since the method being called is a COM method, the __stdcall calling convention applies, which means that the this pointer is on the stack.

    0:023> dd esp+4 l1
    0529f76c  06a88d58

    Using our knowledge of the layout of a COM object, we can navigate through memory to find the vtable.

    Read more: The old new thing

    Posted via email from .NET Info

    How to use Image Zoom In, Zoom Out, and Rotate in Silverlight 4

    |
    This article will demonstrate Image Zoom In, Zoom Out, Rotate functionality in Silverlight 4. First of all make a new silverlight project using visual studio 2010 and place a project name and save location in local directory. Let's drag and drop one image control and three button on page and add an image using Add Existing Items menu click.

    <UserControl x:Class="TestStoryBoard.Test"
       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">
       <Grid x:Name="mainCanvas" Height="404" Width="733" Background="Black">
           <Grid.ColumnDefinitions>
               <ColumnDefinition />
               <ColumnDefinition Width="Auto" MinWidth="95" />
           </Grid.ColumnDefinitions>
           <Grid x:Name="grid1" Height="400" Width="636" HorizontalAlignment="Center" VerticalAlignment="Center">
               <Image x:Name="image1"
                  Source="orton-nomercy07.jpg"
                  Stretch="Uniform"
                  HorizontalAlignment="Center" VerticalAlignment="Center"
                  RenderTransformOrigin="0.5, 0.5">
                   <Image.RenderTransform>
                       <TransformGroup>
                           <RotateTransform x:Name="Rotator"/>
                           <ScaleTransform x:Name="Scale" />
                       </TransformGroup>
                   </Image.RenderTransform>
               </Image>
           </Grid>

    Read more: C# Corner

    Posted via email from .NET Info

    Silverlight 4 fullscreen madness

    |
    A new blog post at last, after a long time ! Tonight, we will see how silverlight magically lets us show our applications in fullscreen.

    You just need the following code:

    Application.Current.Host.Content.IsFullScreen = true;

    Read more: Development Romance

    Posted via email from .NET Info

    Simplest Way to Implement Multilingual WPF Application

    |
    Introduction

    Globalization is one of the concept that comes to mind when we create applications that might run in different geographical location. Based on the Culture code, we need to modify our application. This is very common case for many developers. I thought lets discuss what I implemented as the most cunning way to deal with this in your WPF application.

    Points of Interest

    Globalization is the most common issue to every application. Many of us might have searched over times to find out the most easiest way to do a Multilingual Application. Believe me, I did the same thing like you. After doing that, I found a lots of articles in net. For instance you can see one from MSDN :

    http://msdn.microsoft.com/en-us/library/ms752337.aspx

    If you have already read the article, you might have found that there is no such actual implementation that clearly demonstrates the concept. That is why I thought to write a concrete article for you to easily implement a truly Multilingual Application.

    Using the code

    Read more: Codeproject

    Posted via email from .NET Info

    DataPager Silverlight Control for Beginners

    |
    It was a long time when I have post on silverlight data grid control, at that time I was thinking of posting complete series of the post on the data grid control I have posted on the data grid grouping control but I didn't post on the paging of the data grid records. Now after long time I have time to see the silverlight and its paging control, I know there are lot of tutorial regarding data pager control But I have this for the absolute beginner who are just started  their journey of the Silverlight.
    For this example I have two controls added in my xaml are one is the data grid control and the second one is the data pager control.
    You can see the code for the data grid control and the data pager control in the List 1, Here you can see that I have set the properties of the data grid control like auto generate columns to false mean I will set the columns for the data grid control, IsReadOnly is set to false mean this grid is used for the display of data and the vertical and horizontal grid line brush and GridLinesVisibility is set to All to show both the horizontal and vertical lines.

    <sdk:DataGrid Grid.Column="1" Grid.Row="1" AutoGenerateColumns="False"  IsReadOnly="True" GridLinesVisibility="All" HorizontalGridLinesBrush="{StaticResource Brush_BorderOuter}"  VerticalGridLinesBrush="{StaticResource Brush_BorderOuter}" x:Name="dgrdDataGrid" VerticalAlignment="Top" Height="296">
        <sdk:DataGrid.Columns>
             <sdk:DataGridTextColumn Binding="{Binding UserID}" Header="User ID"/>
             <sdk:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name"/>
             <sdk:DataGridTextColumn Binding="{Binding LastName}" Header="Last Name"/>
             <sdk:DataGridTextColumn Binding="{Binding EmailID}" Header="Email"/>
             <sdk:DataGridTextColumn Binding="{Binding ContactNumber}" Header="Contact No."/>


    Read more: Asim Sajjad

    Posted via email from .NET Info

    Exam Preparation–Silverlight 4, Development–70-506 (Part 1)

    |
    I’m currently studying for the Beta exam of Silverlight 4. So I thought, why not share what resources I’m using.
    To start with one should be familiar with Silverlight of course, but refreshing some of the topics that haven’t be touched that often is always good. This is by far not the definitive learning guide for the exam, but it’s a start. If you know articles that should be in either one of the categories please let me know.

    What Skills are being Measured?

    You can start on the Microsoft Learning site first: Exam 70-506: TS: Silverlight 4, Development. The are 7 main categories of topics that are measured (not sure what the last 1% is).
    • Laying Out a User Interface (15%)
    • Enhancing the User Interface (14%)
    • Implementing Application Logic (16%)
    • Working with Data (17%)
    • Interacting with a Host Platform (11%)
    • Structuring Applications (13%)
    • Deploying Applications (13%)

    Resources for Laying Out a User Interface

    Arrange content with panels.

    Posted via email from .NET Info