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

Win XP Users: IE Can Be Hazardous to Firefox

| Friday, April 23, 2010
   Although I live in Windows, I avoid Internet Explorer – its the Defensive Computing thing to do. My approach is the same as Steve Gibson’s, we run IE once a month to install Microsoft patches, then ignore it until next month.

   Not too long ago, on his Security Now! podcast, Gibson suggested further protection from IE by setting both the Internet and Intranet zones to “High” security levels. What the heck, I figured, an extra bit of safety can’t hurt. But it did hurt, and thus, this blog posting.

   The advice isn’t new, of course, but I implemented it sometime early this year.
   Unfortunately, I also upgraded my main XP machine to service pack 3 around the same time. Thus, when Firefox acted up, I first suspected the service pack. False lead.

   The problem was that Firefox couldn’t download files. Rather than spend time researching it, I just ran Chrome the few times I needed to download a file from a website. Since the solution was so simple, the problem didn’t rate much time or effort. My email program, Thunderbird, had no problem saving attached files, so I made due.

The Problem:

Windows XP users (this problem does not occur with Windows Vista and 7) who have made changes to the default security Zone settings in IE (7 or 8), may find themselves unable to download .EXE files with Firefox. Changing the security settings from Medium-High to High for the Internet Zone within IE will cause Firefox not to download .EXE files. Which version of Firefox you are using determines what your options are for getting around this issue:

   * Firefox 3.5 – create a new about:config entry for browser.download.manager.skipWinSecurityPolicyChecks
        1. In a new tab type about:config and press enter
        2. If you get a warning about voiding the warranty, click I’ll Be Careful, I Promise
        3. In the list right-click anywhere and select New
        4. Select Boolean
        5. A dialog box will pop-up asking for preference name, type browser.download.manager.skipWinSecurityPolicyChecks
        6. In the next dialog box, select TRUE
        7. Close the tab and the changes will take effect immediately

   * Firefox 3.6 – currently the only options for Firefox 3.6 users are to either drop the security level in IE for the Internet Zone back down to Medium-High or to use another browser such as Chrome for downloading .EXE file

Read more: The Firefox Extension Guru's Blog

Posted via email from jasper22's posterous

Winamp mp3 player concept

|

Axis Of Awesome - 4 Four Chord Song (with song titles)

|

Android running on iPhone

|

NHibernate Membership Provider

| Thursday, April 22, 2010
Project Description
The NHMemberProvider is a complete .Net Membership Provider developed in C# and utilizing NHibernate for data persistence.

The initial release will consist of all source code needed to build and perform integration tests against the NHibernateProvider project. A sample app.config is included as a starting point. I will be adding a reference MVC app in the future.

Please make sure you adjust the app.config for the test projects (and your real project!) to reflect appropriate connection string settings. Some of the integration tests will also require that your machinekeys section includes encryption keys, since auto-generating keys cannot be used for encyrpted or hashed passwords.

While I am currently using this in production, it is a work in progress, so any helpful feedback is always appreciated!

Read more: Codeplex

Posted via email from jasper22's posterous

Microsoft Speech Platform - Software Development Kit (SDK) (Version 10.1)

|
This software development kit contains the documentation, development resources, tools and samples for development of speech applications that utilize the Microsoft Speech Platform Server Runtime 10.1.

Read more: MS Download

Microsoft Speech Platform - Server Runtime Languages (Version 10.1)

The following downloads contain the Microsoft Speech Recognition and Text-to-Speech engine data files for all currently supported languages for the Microsoft Speech Platform - Server Runtime 10.1.

Read more: MS Download

Posted via email from jasper22's posterous

WinForms to WPF Quick reference guide

|
I don’t do a lot of WinForms and WPF work but I came across this very handy article with some associated posters to compare WinForms and WPF both in .NET 3.5 / Visual Studio 2008 and .NET 4.0 and Visual Studio 2010 varieties.

And this is the direct link to the wallchart/poster.

Read more: Notes from a dark corner

Posted via email from jasper22's posterous

Objective-C for Java Programmers

|
The design of Java was heavily inspired by Objective-C, but many people find learning Objective-C after Java to be a difficult challenge. In the first of a two-part series, David Chisnall, author of Cocoa Programming Developer’s Handbook, looks at the similarities and differences in the semantics of the two languages.

Objective-C was created back in 1986, but was a very niche language for much of this time. The main backer was NeXT, a company that shipped only 50,000 computers over the course of a decade, limiting the language’s exposure considerably. When Apple bought NeXT, this started to change. Objective-C became the primary language for development on the Mac, giving it somewhere up to around 5-10 percent of the desktop application development market share. Objective-C wasn't the only supported development language on OS X though, and a lot of developers used things that they were more familiar with. The iPhone, in contrast, did not support anything other than Objective-C for third-party development.

If you're coming to either platform from a Java background, then you might find the change daunting. Objective-C looks very different to Java. Fortunately, once you get past the syntax, the languages are quite similar, and you'll find that the transition is not as difficult as the syntax might imply.

A number of the Java designers had experience with Objective-C, including some who had worked with NeXT on the OpenStep specification. A lot of ideas in Java are lifted directly from Objective-C, or taken from Smalltalk, which inspired both languages. That's not to say that everything is the same in Objective-C. There are some important differences, which I'll explore in this and the next article.
Language Philosophies

Objective-C was designed to bring the encapsulation support that Smalltalk enjoyed to the C language. One of its designers described it as a hybrid language, with the square bracket syntax as a sign indicating the transition from C code to 'object land.'

Read more: InformIT Part 1, Part 2

Posted via email from jasper22's posterous

Tutorial Creating Android Game

|
This tutorial series shows you how to use the Android version of the popular Flixel game engine to make a simple game. You can download the Android Flixel code here.

The Android emulator is pretty slow, and I don't have a real handset to test this on. If you do have a real Android device to test the code with please leave a comment and let me know how it runs.

   * Getting Started [CODE] [VIDEO]
   * Adding the player [CODE] [VIDEO]
   * Adding enemies [CODE] [VIDEO]
   * Adding Weapons [CODE] [VIDEO]

Read more: Hubfailo

Posted via email from jasper22's posterous

Unable to execute a remote stored procedure over a linked server

|
I ran into an interesting situation when executing a Remote Stored Procedure on Linked Server using four part query.  Vista-3139 which is a SQL Server 2005 instance is linked to the SERV2003\SQLDUMMY which is a SQL Server 2000 named instance.  

When I tried to execute a stored procedure:

EXEC [SERV2003\SQLDUMMY].SQLAdmin.dbo.sp_ddlevents Got the following error message.

Could not connect to server SERV2003\SQLDUMMY ' because '' is not defined as a remote login at the server. Verify that you have specified the correct login name.

I checked the Security settings of the linked server and it was set to “Be made using the login's current security context", which is valid considering that the user has all the permissions to login to the remote SQL server.

Read more: Data Access Technologies

Posted via email from jasper22's posterous

A Quick-Start Guide of Process Mandatory Level Checking and Self-elevation under UAC

|
Introduction

User Account Control (UAC) is a new security component in Windows Vista and newer operating systems. With UAC fully enabled, interactive administrators normally run with least user privileges. This article and the attached code samples demonstrate these frequently asked coding scenarios related to UAC.

1. How to check if the current process is running as administrator?

2. How to know if the primary access token of the current process belongs to user account that is a member of the local Administrators group, even if it currently is not elevated?

3. How to check if the current process is elevated? The elevation information is available to only Windows Vista and newer operating systems because there was no UAC and “elevation” before Windows Vista.

4. How to get the integrity level of the current process (System/High/Medium/Low/Unknown)? The integrity level information is available to only Windows Vista and newer operating systems because there was no UAC and “integrity level” before Windows Vista.

5. How to show an UAC shield icon on the UI for tasks that requires elevation?

6. How to self-elevate the current process?

7. How to automatically elevate the process when it's started up?

We provide code samples to demonstrate the above how-to scenarios in three programming languages (native VC++, VC#, VB.NET) to meet the needs of different developers.

Language   Sample

VC++       CppUACSelfElevation
VC#         CSUACSelfElevation
VB.NET   VBUACSelfElevation

The code samples are part of Microsoft All-In-One Code Framework, which is a centralized code sample solution from Microsoft. You can download the code from the project’s Download page: http://1code.codeplex.com/releases/.

Background

Microsoft All-In-One Code Framework delineates the framework and skeleton of most Microsoft development techniques (e.g., COM, Data Access, IPC) using typical sample codes in different programming languages (e.g., Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented to demonstrate one frequently-asked, tested or used coding scenario based on Microsoft’s support experience in MSDN newsgroups and forums.
Demo

This is a quick demo of the attached UAC samples.

Step1. After you successfully build the sample project in Visual Studio 2008, you will get an application depending on the programming language that you are using: CppUACSelfElevation.exe / CSUACSelfElevation.exe / VBUACSelfElevation.exe.

Step2. Run the application as a protected administrator on a Windows Vista or Windows 7 system with UAC fully enabled. The application should display the following content on the main dialog. There is a UAC shield icon on the Self-elevate button.

Read more: Community Goodies

Posted via email from jasper22's posterous

Detecting crypto algorithm?

|
I have a piece of encrypted message with me but no indication of which crypto algo was used to encrypt it. This I am guessing would be the most typical case when you are trying to break someone else's encrypted data.

Question: How do I analyze this encrypted message and first find out which algorithm was used to encrypt it? - DES, AES, RC4?

Read more: Security Tube

Posted via email from jasper22's posterous

Legal spying via the cell phone system

|
Two researchers say they have found a way to exploit weaknesses in the mobile telecom system to legally spy on people by figuring out the private cell phone number of anyone they want, tracking their whereabouts, and listening to their voice mail.

Independent security researcher Nick DePetrillo and Don Bailey, a security consultant with iSec Partners, planned to provide details in a talk entitled "We Found Carmen San Diego" at the Source Boston security conference on Wednesday.

"There are a lot of fragile eggs in the telecom industry and they can be broken," Bailey said in an interview with CNET. "We assume the telecom industry protects our privacy. But we've been able to crack the eggs and piece them together."

The first part of the operation involves getting a target's cell phone number from a public database that links names to numbers for caller ID purposes. DePetrillo used open-source PBX software to spoof the outgoing caller ID and then automated phone calls to himself, triggering the system to force a name lookup.

Read more: CNet

Posted via email from jasper22's posterous

Helium Baloons with Digital Cameras Create Grassroots Maps

|
I'm getting ready for day five of a two-week workshop for high schoolers at Beaver Country Day School in a suburb of Boston. The subject is my project, Grassroots Mapping, which helps teach people -- often young people -- around the world how to be activist cartographers and how to make their own maps. There's a twist, however: Instead of just marking a Google Map, or walking around with a GPS tracker, we construct simple capsules to hold a cheap digital camera, and send the whole package up on a helium balloon or a kite.

Read more: Idea lab
Official site: Grassroots Mapping

Posted via email from jasper22's posterous

Botched McAfee update shutting down corporate XP machines worldwide

|
We're hearing from all over that a bad McAfee for Windows XP update is causing computers worldwide to shut down. Apparently DAT update 5958 deletes the svchost.exe file, which then triggers a false-positive in McAfee itself and sets off a chain of uncontrolled restarts and loss of networking functionality. Yeah, wild -- Twitter is basically going nuts, and McAfee's support site appears to be down. There are some fixes floating around out there, but it may be too late -- the final tally of borked PCs today may reach into the millions. We've already heard anecdotally that an Intel facility has been affected, as well as Dish Network call centers, and we're sure there are going to be more reports as the day wears on.

Read more: engadget

Posted via email from jasper22's posterous

Dumping .NET classes to debug output

|
Introduction

The good old problem: how to find a variable value during code execution? Debuggers with breakpoints and watch windows are great, but only if the program can be stopped in the right moment in the right spot. Unfortunately, conditions are not always that ideal and dumping needed values to a log file or console, for future analysis, is a more realistic option.

Another common scenario is a simple debugging or run-and-forget utility that needs to produce human readable output with minimal coding. Such tool is not intended for non-technical users and beautification of the output is not a priority, yet time spent on producing useful output is.

In either of these cases I often find myself writing code like
Collapse

class C {
   public int X;
   public string Y;
   public DirectoryInfo Child;
   public int Z;
}
...
C c=...

// Oops, that prints just "MyNamespace.C", hardly useful
// Debug.WriteLine("c="+c);

Debug.WriteLine("--- Value of c ----");
Debug.WriteLine("c.X="+c.X);
Debug.WriteLine("c.Y="+c.X); // Oops, dumping the wrong field
Debug.WriteLine("c.Child=FileInfo { Name="+c.Child.Name +"}"); // This will sometimes throw NullReference exception
Debug.WriteLine("-------"); // Forgot to dump Z field :(

Not only this is verbose and annoying to write, the first iteration of such code is often useless. Either the object being dumped does not override its ToString method, or output is confusing because of typos, or useful fields are not included, or exceptions are thrown, or multiple threads at a time execute the code and Debug.WriteLine output is mixed together. Things get even worse when there are anonymous objects, arrays, enumerations, lists, references to other objects (with loops) in the properties, that need to go to the log file as well.

There is a better way: a generic debug writer that uses reflection to display all object fields and properties, walks the object graph if neccesary, and produces something human readable and with enough information for analysis. This is hardly a new idea, CodeProject already has an article on the topic, and some other solutions can be found on the Internet, but I wanted something more flexible, simple, generic and that is a single .cs file without any dependencies, so can be added to any project. And during development of XSharper framework/scripting language Dump class was created.

Read more: Codeproject

Posted via email from jasper22's posterous

TestApi - a library of Test APIs

|
TestApi is...
TestApi is a library of test and utility APIs that enables developers and testers to create testing tools and automated tests for .NET and Win32 applications. TestApi provides a set of common test building blocks -- types, data-structures and algorithms -- in a simple, layered, componentized and documented stack.
Get Started

   * Get the latest release.
   * Read the following blog articles for a quick introduction to some of the available features:
         o Overview of TestApi
         o Part 1: Input Injection APIs
         o Part 2: Command-Line Parsing APIs
         o Part 3: Visual Verification APIs
         o Part 4: Combinatorial Variation Generation APIs
         o Part 5: Managed Code Fault Injection APIs
         o Part 6: Text String Generation APIs
         o Part 7: Memory Leak Detection APIs
         o Part 8: Application Control APIs
         o Part 9: Object Comparison APIs
   * Read the documentation, experiment with the samples, check out the source code.
   * Let us know what features you would like to see in future releases.

Read more: Codeplex

Posted via email from jasper22's posterous

Yet Another Way to Determine the Sync Object for Which Your Thread Is Waiting

|
A couple of years ago I gave a cursory visit to the subject of diagnosing a Monitor-based deadlock in a managed application, and then a few months ago I demonstrated in greater detail how to locate the synchronization object your thread is waiting for using SOS.

[Side note: It’s always easy to see the list of currently owned Monitors (sync blocks) using the SOS !SyncBlk command, which also tells you which thread owns each synchronization object. The hard part is to find the synchronization object for which your thread is waiting if you don’t have any prior knowledge of this particular lock your application is using.]

It’s always good to have another way of doing the same thing, in case something doesn’t work out in the debugger. This post shows a third approach to detecting the synchronization object for which your thread is waiting.

After attaching to the process, use !Threads, !CLRStack, and !SyncBlk as usual to see the general picture. In this example, here are the threads (edited for brevity):

0:004> !Threads
ThreadCount: 3
...                          
      ID OSID  APT  Exception
  0    1 1320  MTA
  2    2  fec  MTA  (Finalizer)
  3    3 18d8  MTA  (Threadpool Worker)

OK, so we have a few of threads here, one is the main thread, the other is the finalizer thread, and the third is a thread pool thread. Here’s the call stack for the application’s threads (edited for brevity, e.g. I removed the unmanaged threads):

0:004> ~* e !CLRStack
OS Thread Id: 0x1320 (0)
Child-SP         RetAddr          Call Site
000000000013ee10 000007fef7d8d502 LocksAndLocks.Program.Main()
OS Thread Id: 0xfec (2)
Failed to start stack walk: 80004005
OS Thread Id: 0x18d8 (3)
Child-SP         RetAddr          Call Site
000000001aecf510 000007fef6c72bbb …c__DisplayClass1.<Main>b__0(…)
000000001aecf560 000007fef6ce7411 System.Threading.ExecutionContext.Run(…)
000000001aecf5b0 000007fef6ce724f …PerformWaitCallbackInternal(…)
000000001aecf600 000007fef7d8d502 …PerformWaitCallback(…)

“Failed to start stack walk”—in other words, the finalizer thread is not currently executing any managed code. Not interesting.

And here are the sync blocks (edited for brevity):

0:004> !syncblk
SyncBlock           Owning Thread     SyncBlock Owner
0000000000c38408          3           0000000002683a98 System.String

What is this string anyway?

Read more: All Your Base Are Belong To Us

Posted via email from jasper22's posterous

List of Undocumented Stored Procedures in SQL Server

|
I have been searching for a list of Undocumented Stored Procedures in SQL Server for quite a while. Here is a list collected from forums and other sites for your reference. Remember most of these stored procedures are deprecated and can be removed from future versions of SQL Server, so use them cautiously!

Undocumented Stored Procedures in SQL Server

sp_checknames
sp_columns_rowset
sp_enumoledbdatasources
sp_fixindex
sp_gettypestring
sp_ms_marksystemobject
sp_msaddguidcolumn
sp_msaddguidindex
sp_msaddlogin_implicit_ntlogin
sp_msadduser_implicit_ntlogin
sp_mscheck_uid_owns_anything
sp_msdbuseraccess
sp_msdbuserpriv
sp_msdependencies
sp_msdrop_object
sp_msforeachdb
sp_msforeachtable
sp_msget_qualified_name
sp_msgettools_path
sp_msgetversion
sp_msguidtostr
sp_mshelpcolumns
sp_mshelpindex
sp_mshelptype
sp_msindexspace
sp_msis_pk_col
sp_mskilldb
sp_msloginmappings
sp_mstablekeys
sp_mstablerefs
sp_mstablespace
sp_msunc_to_drive
sp_msuniquecolname
sp_msuniquename
sp_msuniqueobjectname
sp_msuniquetempname
sp_tempdbspace
sp_who2
xp_delete_file
xp_dirtree
(more...)

Read more: SQL Server curry

Posted via email from jasper22's posterous

Microsoft SQL Server JDBC Driver 3.0

|
In our continued commitment to interoperability, Microsoft has released a new Java Database Connectivity (JDBC) driver. The SQL Server JDBC Driver 3.0 download is available to all SQL Server users at no additional charge, and provides access to SQL Server 2008 R2, SQL Server 2008, SQL Server 2005 and SQL Server 2000 from any Java application, application server, or Java-enabled applet. This is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5 and above.

This release of the JDBC Driver is JDBC 4.0 compliant and runs on the Java Development Kit (JDK) version 5.0 or later. It has been tested against major application servers including IBM WebSphere, and SAP NetWeaver.

Note: By downloading the SQL Server JDBC Driver 3.0, you are accepting the terms and conditions of the End-User License Agreement (EULA) for this component. Please review the End-User License Agreement (EULA) located on this page and print a copy of the EULA for your records.

Read more: MS Download

Posted via email from jasper22's posterous

PipeTerm source code released to MSDN Code Gallery

|
The PipeTerm utility binary was released to MSDN Code Gallery some time ago – this is useful if you are booting/running an o/s image in Virtual PC and want to capture serial debug output from the running o/s to a named pipe client running on the desktop – Kurt Kennett has now released the source code for PipeTerm to MSDN Code Gallery – the source can be found here.

Read more: Windows Embedded Blog
Official site: PipeTerm, PipeTerm-source-code

Posted via email from jasper22's posterous

CodeBlock

|
Project Description

CodeBlock is CLI implementation which uses LLVM as its native code generator.

CodeBlock provides LLVM binding for .NET which is written in C#, and CLR implementation, written in F#.

Wiki
LLVM

License Notes
These notes must be redistributed together with license.
To avoid any GPL-related discussions on using dynamic link libraries, any software, which uses parts of this project (links to it dynamically, calls its executables) directly or indirectly (via other software) must be GPL too.
You can discuss commercial licensing using contact info below.

Source Code
It is on very first stages, but already usable.
I currently have no time to add LLVM dll projects to main LLVM source, so you must download precompiled versions for your system in order to use C# binding.

Read more: Codeplex
Read more: LLVM

Posted via email from jasper22's posterous

Stress testing Visual Studio 2010

|
In the past several months Visual Studio and I have been really busy stress testing each other. This post is a general overview on what we've been up to and what kind of testing we're doing. I've learned a lot about stress testing and I have to say it's actually a lot of fun, so I guess it's worth sharing. I'll try to make this a series of several posts, diving into more technical details in the upcoming posts.
Background

During Beta 1 and Beta 2 it became painfully obvious that the new VS had an obesity problem: it was slow, consumed a lot of memory and the worst thing, with enough modules loaded it stopped fitting into the 2GB address space on 32-bit machines. There were several reasons for this, which Rico Mariani, Brian Harry and others have extensively blogged about. In a nutshell, with a lot of new functionality a lot more modules were loaded into memory. Besides, we now had to fully load the CLR and WPF at application startup. Moreover, there were all kinds of memory leaks all over the place.
Making performance a top priority

Of course this wasn't good, so our management made the right decision to make performance our top priority. Jason really took it seriously and we dedicated a lot of people to work fulltime to make Visual Studio fast and lean. As part of this effort I became a member of a virtual team called "Perf SWAT". This team is responsible for essentially three things: performance, memory consumption and design-time stress.

Performance is clear: we need to be fast. Memory consumption is clear too: when we load, we need to take as little memory as possible, and avoid things such as double-loaded modules, loading both NGEN and IL versions of an assembly, and so on.
Design-time stress on the VSL team

As for design-time stress, the goal is once we're loaded into memory, jitted, warmed up and all the caches are filled, we should not continue to grow in consumption. This means find and eliminate all memory and resource leaks. Run-time stress means finding leaks in the CLR and BCL, design-time stress means finding leaks in the VS and tooling. I am responsible for design-time stress testing for the VSL team (managed languages). I need to make sure that there are no significant leaks in 4 areas:

  1. C# IDE and editor integration (C# code editor, navigation, refactorings and other core C# areas)
  2. VB IDE and editor integration
  3. F# IDE
  4. Hostable Editor (Workflow Designer in VS 2010 is essentially hosting a full-blown language service to show IntelliSense in the expression editor on the workflow diagram)


Read more: Kirill Osenkov Part 1, Part 2, Part 3

Posted via email from jasper22's posterous

CodeCompare

| Wednesday, April 21, 2010
main.jpg


CodeCompare is an absolutely new way of source code comparison.
We design this product on the programmer to programmer philosophy, so you can be sure that this product perfectly fits your needs.

Unique Visual Studio integration brings you all the features you lack all the time:

   * Enhanced Visual Studio editor
   * IntelliSense and Syntax Highlighting
   * Code folding
   * Advanced code comparing and merging functionality
   * Simple source control system integration


Give it a try and you will not regret!

Read more: devart

Posted via email from jasper22's posterous

Setting up Mercurial server in IIS7 using a ISAPI module

|
Previously, Jeremy Skinner posted a very thorough guide on setting up Mercurial in IIS. The difference between his guide, and what I'll be walking you through, is how Mercurial is hosted in IIS. Where he shows you using a CGI script that executes python.exe, my guide will show you how to use isapi-wsgi to host Mercurial. The biggest benefits of using isapi-wsgi over executing python.exe, is the raw processing speed and the overall throughput your server can handle.

Note: This post uses Mercurial 1.5.1, Python 2.6.5 although it should work for all older/future versions released.

Packages Installation

Install Python

The reason you need to install Python first, is that all subsequent installations will install directly into the Python installation (in the Lib\site-packages folder), including Mercurial. It is important to note that you will need to install the version of Python that Mercurial was built against, as well as installing the x86 version (yes, even if you're on a x64 platform). Download and install Python 2.6.5.

Install PyWin32

This component is needed to run certain win32 functions (specifically for ISAPI) that isapi-wsgi needs. Download and install this package, letting it determine the default installation path for you.

Install Mercurial Source

Normally, you would download the binary package for Mercurial, but for this process to work, you will need to utilize the source code package. Download the mercurial-1.5.1.win32-py2.6.exe package and install it. Just as PyWin32, let it determine the default installation path for you.

Install isapi-wsgi

This is the glue that binds everything together. It's used to build a shim based on a python script that you setup (later). Download and install this package, also letting it determine the default installation path for you.

Get hgwebdir_wsgi

You will now need to download the python script hgwebdir_wsgi.py. This is the script that you will configure to and execute to build the ISAPI shim DLL. This script is apart of the Mercurial source code, and is not distributed with the binaries or the earlier installation. To get it, you can download the source code from the Mercurial site, or clone their repository by executing the following command

hg clone http://selenic.com/repo/hg#stable

Once you have the source, you can find the script in the contrib/win32 directory.

Read more: eXentrics world

Posted via email from jasper22's posterous

Understanding !PTE

|
Hello. It’s Ryan Mangipano again (Ryanman). Today’s blog will be the first in a multi-part post designed to help you understand the output of the !PTE debuger comand along with the basics of hardware Virtual Addressing.  To better understand Virtual Addressing, we will use the debugger to manually translate a 4-KByte Page Table PAE virtual address into the actual physical addresses in order to understand what !PTE is displaying. I’ll provide relevant information about Virtual Addresses and Virtual Memory along the way.  

We’ll start by translating a non-prototype valid hardware VA from an x86 PAE system

The actual process of manually decoding a virtual addresses is going to vary according to the architecture (x86, x64), size of the page, whether or not the virtual address is a large page, whether the page is marked as valid, whether it’s a hardware or software PTE, and whether PAE is enabled. For simplicity, we will not be going over the table entry (PTE/PDE)  flags until part two of the blog. For my first example, I am going to demonstrate how to use the information in the processor manuals together with the debugger to decode a valid non-prototype virtual address into the physical memory that it references.  You can then try this on your own using windbg and the !pte command to validate your findings.  

Finding an address to translate

To start, we'll need to locate a virtual address that maps to a valid PTE. I am going to use the following highlighted virtual address which I found in a memory dump.  

f9a12d0c ff155400a1f9    call    dword ptr [sfilter+0x4054 (f9a10054)]

Get out your processor manuals

The AMD and Intel manuals both contain helpful reference material on this subject. PDFs of these manuals are available online. Since my CPU is an Intel, I’m going to refer to the Intel manuals.

1: kd> !cpuinfo

CP  F/M/S Manufacturer  MHz PRCB Signature    MSR 8B Signature Features
0 15,6,4 GenuineIntel 3192 0000000400000000                   a0073fff

My Intel manuals arrived on CD via snail mail a few days after placing my free order:
http://www.intel.com/products/processor/manuals/order.htm

Is PAE in use?

On this Intel x86 system, we first need to determine if we are using PAE. In the Intel “System Programming section 3.6.1 Paging Options” I found that the PAE (Physical Address Extension) flag can be found in bit 5 of the CR4 register. The PG (Paging) flag in CR0 which enables paging must of course also be set. Register bit numbering starts at zero so it’s the fifth bit from the right. Let’s examine cr4 and convert the value it contains into binary:

1: kd> r cr4
cr4=000006f9

1: kd> .formats 000006f9
 Binary:  00000000 00000000 00000110 11111001

Read more: Ntdebugging Blog Part 1, Part 2

Posted via email from jasper22's posterous

Programmatically Enumerating, Attaching, and Detaching SQL Server Databases

|
Overview

This writing is like an encyclopedia for the SQL statements and stored procedures used to enumerate, attach, and detach databases on a SQL Server instance. It lists the statements and stored procedures that you can use and discusses them in simple examples.

Introduction

Today we are going to talk about how to programmatically enumerate databases on a SQL Server instance and how you can attach and detach SQL Server databases.

Enumerating Databases on a Server

You can get a list of databases on a server using one of many ways:

   * INFORMATION_SCHEMA.SCHEMATA system view (SQL Server 2000 only)
   * sys.sysdatabases system table (a view in SQL Server 2005 and higher versions)
   * sys.databases system view (SQL Server 2005 and higher versions)
   * sys.sp_databases stored procedure

INFORMATION_SCHEMA.SCHEMATA System View

If you are using SQL Server 2000, you can query the system view INFORMATION_SCHEMA.SCHEMATA to get information about current databases on the server.

Read more: C# Corner

Posted via email from jasper22's posterous

UITest Framework Mozilla Firefox support in VS 2010

|
Test Package for Mozilla Firefox will be a feature pack for Visual Studio 2010 that enables playback of UI actions on a website/web application that have been recorded on Windows Internet Explorer 7 and 8 on Mozilla Firefox web browser. Currently this is in Beta stage and will be released with VS 2010 Feature Pack.

Please note that recording UI actions on Mozilla Firefox is not supported. There is no UICL (UI control Locator) support for controls in Mozilla Firefox. The Benefit of this model is that any recording in IE would playback in Mozilla Firefox without any code change. Even the assertions added through UICL to verify the state/properties of controls need not be changed for validation in Mozilla Firefox. With one time recording in IE, we can playback in IE or Mozilla Firefox any number of times. Thereby all the CodedUITest projects recorded for IE or scenarios recorded in MTM would seamlessly playback in Mozilla Firefox, by just enabling the Mozilla Firefox plugin.

Please take a look at this blog for information related to Record & Playback on IE applications.

Supported Mozilla Firefox version

This package enables playback of UI actions on the following versions of Mozilla Firefox

· Mozilla Firefox 3.5 and above are supported.
Multiple Version Support

The user could have multiple versions of Mozilla Firefox installed & multiple languages of the same version of Mozilla Firefox installed. The playback provides the user to choose the version & language of Mozilla Firefox on which the playback is supposed to happen. While doing playback using MTM, all the Firefox versions installed on the machine are displayed to the user to choose from. In case of CodedUITest the user can set the BrowserWindow.CurrentBrowser property to any of the installed versions & playback chooses the mentioned Mozilla Firefox version for playback.

Read more: Visual Studio Team Test

Posted via email from jasper22's posterous

Debugging a crash

|
Debugging & troubleshooting applications is a major part of my job, but not using debuggers like WinDBG. Although I have a great liking around using the debuggers, I don’t spend a lot of my time these days using this debugger. So when I get time, I generally read books and use sample code to brush up my debugging skills. I had read the book – Advanced Windows Debugging a couple of times. I recently picked up one of the examples from the book to debug a crash. The book uses a slightly different approach to debugging the example problem. It gives us the liberty of source + private symbols. Unfortunately, in support, when we get memory dumps we get the state of the crash and usually won’t have access to third party source & symbols. So why not blog about how I understood the cause of the crash from a support perspective?

The sample is plain and simple. The program takes an argument of type string. I am instructed to run it under a debugger – WinDBG & pass a string as command line argument which is long and it should crash the application. The task is to determine why the program crashed.

The moment the program starts running, it breaks into the debugger upon hitting the initial breakpoint. Thereafter, I just type ‘g’ and hit enter to let the program run. As indicated, the program immediately crashes due to an Access Violation and breaks into the debugger.

0:000> g
(114c.19b4): Access violation – code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=000cfefc ebx=00000000 ecx=000cff3a edx=00502a36 esi=00000001 edi=0100367c
eip=010012a7 esp=000cff44 ebp=000c0000 iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010206
05Program!wmain+0×17:
010012a7 8b550c          mov     edx,dword ptr [ebp+0Ch] ss:002b:000c000c=????????

From this, I can tell a few things as to why we crashed. The system attempted to de-reference a pointer located at the address contained in EBP register with an offset of 0C. We attempted to dereference the pointer so that we can store its value in the register EDX. The value we got was invalid and is at location 000c00c

OK, so why is this address bad? What is the type of address we attempted to de-reference?

Read more: Codestyle

Posted via email from jasper22's posterous

Windows Intune Beta: Enterprise Options for Small Orgs

|
Microsoft on Monday launched a limited public beta of a new Windows 7-based desktop PC security and management service for smaller organizations.

The service, called "Window Intune," is being designed for organizations with between 25 and 500 PCs, which Microsoft defines as midmarket users. The current beta of the service will only be available to users in North American markets (United States, Canada, Mexico and Puerto Rico), according to Sandrine Skinner, director for Windows Commercial.

A Microsoft FAQ explains that the service will only be available to the first 1,000 customers until May 16, 2010. Organizations interested in trying out Windows Intune can sign up for the beta at the Microsoft Online Services portal here. During the trial period, users can manage only up to 20 PCs.

Midmarket organizations typically lack personnel or may have one IT generalist on staff tasked with managing desktops, network applications and servers, according to Skinner. They tend to have the same IT needs as larger organizations, yet they have smaller budgets, she added.

"They aspire to have access to enterprise-class solutions, but they don't have the means to do so, both financially and in terms of head count," Skinner explained in a phone interview.

The new service offers resources typically available to larger organizations that have signed on to Microsoft's multiyear volume licensing agreements. However, with Windows Intune, Microsoft will offer these resources on a monthly-fee basis. The pricing and licensing details for the service have not yet been fully worked out, according to Skinner. She expected that Microsoft would begin to offer the Windows Intune service about a year after the beta's release.

The service is different from Microsoft's volume licensing offerings in that it specifically pairs the Windows 7 operating system with online management tools, Skinner explained. However, it does include some of the benefits typically derived by Microsoft's Enterprise Agreement volume licensing customers.

Read more: Microsoft Online
Official site: Window Intune

Posted via email from jasper22's posterous

Grid computing using C# Script and .NET Remoting

|
If I count the numbers of the top articles I have seen till now, the article “C# Script: The Missing Puzzle Piece” by “Oleg Shilo” is one of them. If you didn’t see that I recommend you to view it then come back to this article; because this article is based on C# script engine.

C# script is a solution for acting C# codes as a script language. It uses C# compiling engine for compilation and then executes it.

When I saw that article I thought that what happens if I could use this engine on the network? And I started making a solution to use it on several computers that connected together.

Here I don’t want to describe the C# Script Engine. For more information see the main article or the CS-Script home page.
Usages

We can use this idea to compute long-time taken algorithms on more than one computer by paralleling the execution (called “Grid Computing”). For more information see the sample at the end of this article that I calculated the pi number using my solution.

Another great usage of C# script on network is executing some actions and jobs on the network like as remote management and everything you can imagine!

Just think a little about usage of this idea and then you can find this idea very useful!
Security Attention

When you use this project be aware that it can be a back door for computers who CS-Script Service have been installed on them (our executers) because it can execute any code that requested!

For simplicity I didn’t add any authentication and encryption techniques to authorizing the execution requester, but I’m going to add these policies to article later and I’ll glad to hear your suggestions. If you want to implement some security options for .Net Remoting, you can see the article of MSDN about “Writing an Asymmetric Encryption Channel Sink”
.Net Remoting

As you may know .Net Remoting is a technology of .Net for communication of processes over the network. If you are not familiar with .Net Remoting you can see the articles about that like this and this.
I’ve been used .Net Remoting for communication between a manager and executers (both are described below). For getting away from firewalls and security boundaries I used HTTP channel and SOAP formatter.
Introduction to Grid Computing

One of the main strategies of grid computing is using software to divide and apportion pieces of a program among several computers, sometimes up to many thousands. Grid computing is distributed, large-scale cluster computing, as well as a form of network-distributed parallel processing‎ [1].

I assumed a simple shape of grid computing with one manager and some executers connected to the manager.

Read more: Codeproject

Posted via email from jasper22's posterous

ComObject Visualizer

|
Recently I worked on a project which dealt with Excel and PowerPoint applications and encountered the impossibility to view type of COM object while debugging. I tried to use GetType but it returned a __ComObject  which by itself doesn’t contain any helpful information about underlying interface.

I’ve decided to create a visualizer for Visual Studio, which helps to work with COM objects while debugging. Therefore this article will describe a way to identify supported by COM object interfaces.
Background

Below is an example of code which finds a shape in Excel and casts it to TextBox, a control of Office.Forms:

 using Microsoft.Office.Interop.Excel;
 using TextBox=Microsoft.Vbe.Interop.Forms.TextBox;
 ...


       Shape shape = sheet.Shapes.Item("ctool");
       OLEObject oleObject = (OLEObject) shape.OLEFormat.Object;
       TextBox TextBox = (TextBox) oleObject.Object;
       ...

Read more: Codeproject

Posted via email from jasper22's posterous

Mzz - фреймворк для программиста

|
Для развертывания сайта вовсе необязательно покупать дорогостоящие системы управления содержимым, гораздо лучше обратить внимание на так называемые фреймворки – компоненты, для создания собственной CMS (Content Management Framework). Используя фреймворк, вы создаете портал, с той функциональностью, которая нужна именно вам, а не разработчикам готовых решений (CMS).

Почему CMF вместо CMS

На рынке ПО представлено множество вариантов классических CMS. Все они отличаются условиями распространения и функциональными возможностями. Есть настоящие монстры в этой области (например, «Битрикс»), обладающие функциями, которые только могут присниться самому изощренному клиенту. Несмотря на это, у всех CMS есть один недостаток – недостаточная гибкость в настройке. Зачастую, разработчики систем управления контентом, поставляют со своим детищем множество не нужных модулей, за которые приходится платить. А что если требуется создать, скажем, портал определенной направленности? Например, новостной. На нем вовсе необязателен форум или гостевая книга. Минимум, что необходимо для такого проекта: удобный интерфейс для создания новостных лент, плюс возможность передачи новостей клиентам с помощью популярных технологий (RSS, e-mail и т.д.). При таком раскладе куда проще взять специализированный фреймворк, и реализовать весь необходимый функционал на его возможностях. Это будет намного проще, удобнее и надежнее. Для понимания реальной выгоды рассмотрим наиболее сильные стороны CMF:

1. Экономия финансовых средств. Нет смысла покупать, если можно найти хорошую бесплатную альтернативу, на поддержку которой не потребуется больших вложений. В случае с фреймоворк – экономия на лицо. Берем лишь необходимые компоненты, и используем в своих целях.
2. Простота интеграции. Когда сайт уже готов и требуется добавить необходимую функциональность, гораздо проще перестроиться на CMF, нежели переходить на полноценную платформу CMS.

Mzz – надежность, гибкость, простота

Mzz (http://mzz.ru) – новая платформа для разработки WEB-приложений, основанная на классической идее разделения бизнес логики и представления (MVC). Обладая необычайной гибкостью, на основе данного пакета можно собрать любое приложение для WEB.

Read more: vr-online.ru

Posted via email from jasper22's posterous

Announcing DbLinq 0.20.1

|
The DbLinq[0] team is proud to announce the release of DbLinq 0.20.1, following the DbLinq 0.20 release from last week.

DbLinq is a reimplementation of System.Data.Linq.dll for use with SQL servers in addition to Microsoft SQL Server.  Support is provided for:

     * Firebird [1]
     * Ingres [2]
     * MySQL [3]
     * Oracle [4]
     * PostgreSQL [5]
     * SQLite [6]
     * SQL Server [7]

Note that not all servers are supported equally: some tests will pass under some database backends while failing under others.  I maintain the SQLite and SQL Server backends, while the community handles the others.

This is a minor update to address some DBML validation deficiencies found in the 0.20 release.  Fixes include [8]:

     * 233: Fix IOE in Processor.ValidateAssociations()
     * 234: Fix NRE when looking up DataContext base class name.
     * 235: Support <Association/>s with empty @Storage and @Member.
     * 237: Empty //Table/@Name strings are not valid table names.

Enjoy!

Read more: Mono-list
Official site: DbLinq

Posted via email from jasper22's posterous

Selecting CLR Version From Unmanaged Host

|
I just saw this go by on an internal DL and it seemed worth documenting.

   What is the correct way determine what framework version is installed on a computer to choose the correct CLR hosting approach?

   I would like to use CLR 4.0 runtime if CLR 4.0 is installed (and use CLRCreateInstance -> ICLRMetaHost->GetRuntime), but if it is not installed, I’d use CorBindToRuntimeEx.

   According to MDSN, GetCORVersion is deprecated. What should I use instead? ICLRRuntimeInfo::EnumerateInstalledRuntimes would not work in an environment where CLR 4.0 is not installed, correct?

   I would like my code to work in CLR 2.0+ environment.

And the answer:

       * LoadLibrary mscoree
       * GetProcAddress for CLRCreateInstance. If you get NULL, fall back to legacy path (CorBindToRuntimeEx)
       * Call CLRCreateInstance to get ICLRMetaHost. If you get E_NOTIMPL, fall back to legacy path (same as above)
       * Otherwise, party on the ICLRMetaHost you just got


Read more: Brad Wilson

Posted via email from jasper22's posterous

A trip down the .Net 4 System.Xml path, some pitfalls and how you can avoid them

|
Pitfalls in working with DTD's, duplicate namespaces, significant whitespace and SchemaSets; includes new and obsolete features in System.XML 4.0

Introduction

Download the source: Download XmlTests.zip - 128.6 KB [GD: Click through for the link]

Download the PDF: Download Common_Pitfalls_in_System.Xml_4.0.pdf - 189.44 KB [GD: Click through for the link]

This small session presents my own research behind some of the pitfalls found in System.Xml and child namespaces. We’ll be discussing :

   * non-obvious differences between XDocument and XmlReaders/Writers
   * namespace handling with duplicate namespace declarations
   * how to properly treat mixed-content XML files
   * difficulties with Streams and SchemaSet

Finally we’ll take a look at what’s been made obsolete and what’s brand new in the different namespaces in System.Xml for .NET 4.0.

You will need:

   * Visual Studio 2010 (most will work with VS2008 SP1 too)
   * A strong base of C# and XML, working knowledge of XPath and XSLT to understand every example. If you also know DTD’s and XML Schema’s all the better!

This session is not intended to teach you about how to process basic XML files in C#, you should know this already, sorry!

If you’re in a hurry, skip forward to the conclusions of each topic, everything in between is background information or proof.

I hope this research helps you avoid bugs in the future and help you pay attention to some specific pitfalls found in System.Xml

Read more: Greg's Cool [Insert Clever Name] of the Day

Posted via email from jasper22's posterous

SQL SERVER – Find Most Active Database in SQL Server – DMV dm_io_virtual_file_stats

|
Few days ago, I wrote about SQL SERVER – Find Current Location of Data and Log File of All the Database. There was very interesting conversation in comments by blog readers. Blog reader and SQL Expert Sreedhar has very interesting DMV presented which lists the most active database in SQL Server. For quick reference he has included the size of the disk in KB, MB and GB as well.

SELECT
DB_NAME(mf.database_id) AS databaseName,
name AS File_LogicalName,
CASE
WHEN type_desc = 'LOG' THEN 'Log File'
WHEN type_desc = 'ROWS' THEN 'Data File'
ELSE type_desc
END AS File_type_desc
,mf.physical_name
,num_of_reads
,num_of_bytes_read
,io_stall_read_ms
,num_of_writes
,num_of_bytes_written
,io_stall_write_ms
,io_stall
,size_on_disk_bytes
,size_on_disk_bytes/ 1024 AS size_on_disk_KB
,size_on_disk_bytes/ 1024 / 1024 AS size_on_disk_MB
,size_on_disk_bytes/ 1024 / 1024 / 1024 AS size_on_disk_GB
FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS divfs
JOIN sys.master_files AS mf ON mf.database_id = divfs.database_id
AND mf.FILE_ID = divfs.FILE_ID
ORDER BY num_of_Reads DESC

If you like to read and practice with DMVs, I suggest to read the blog of my very good friend Glenn Berry. He is one DMV expert.

Read more: Journey to SQL Authority with Pinal Dave

Posted via email from jasper22's posterous

URL Sniffer Based on NetFilter SDK

|
Hi,

Just moved here, from Codeproject my article, How to use NetFilter SDK to develop an URL Sniffer. I'm not the author of this SDK but I founded it quite Professional and Flexible, so I wanted to share some explaination and piece of code here.


In this little article we are going to discuss one of various potential usages of {NetFilter SDK} that is a powerul framework for transparent filtering of Data Packets Exchanged, on Windows. By using NetFilter we are able to develop Basic Firewalls, Network Monitors and all possible applications that has something to do with Data Packet Management.

In our application we will use an higher abstraction level of raw data packet filtering, called Protocol Filtering. NetFilter is capable of advanced packet parsing, so we can work directly with protocols like HTTP, SMTP, POP3, SSL.

In our application we will filter all outgoing HTTP Request and dump the URL.

Using the code

Before starting to code the Url Sniffer we have to understand the architecture of NetFilter SDK. We have essentially two components, one at Kernel Mode (the filter driver) and a correspondant User Mode Interface, given by a DLL.

Filtering functionality is basically accomplished by netfilter2.sys a Transparent Filter Driver, that hooks at NDIS Level and allows transparent operations, this means that we will not have any conflict with products like AntiVirus or Firewalls.


Read more: Evilcodecave

Posted via email from jasper22's posterous

SqlClient Default Protocol Order

|
A while ago, someone came to me with a very interesting problem: basically, his .NET application was taking more than a minute to open a connection. After a quick look and some investigations, we found out that only Named Pipes was enabled on this individual’s SQL Server. Since this is a legitimate configuration, I decided to document this behavior in this post, so that, you can quickly find an answer if you face this problem.

As you know, SqlClient implements native access to SQL Server on top of SQL’s protocol layer. To establish communication between client and server both need to use the same protocol.

By default, SqlClient attempts to make the connection using the following protocol order[1]:

  1. Shared Memory
  2. TCP/IP
  3. Named Pipes

Starting from the first one, it moves to the next, failure after failure until reaching a valid one. So, if only Named Pipes is enabled on the server, the client goes through a failed Shared Memory and a failed TCP/IP (with their timeouts) before reaching the right one.

Read more: ADO.NET team blog

Posted via email from jasper22's posterous

Twitter Goes Anywhere With New API

|
Last month Twitter CEO Evan Williams announced Twitter Anywhere, but it wasn’t exactly clear what it was. Now the microblogging platform, which looks pretty busy with all its announcements from its developer conference, is sharing more details about the API that is part display widget and part external login, all controlled via JavaScript.

There are three elements to Anywhere: follow buttons, tweet boxes and user logins. There are also some simple ways to bring the interactivity of twitter.com into your site, such as automatically linking usernames and activating hover boxes to get additional information about a user. Twitter has provided great example code. Read on for an overview of each portion.

Follow Buttons

If you want to encourage your visitors to follow you without sending them away from your site, simply embed a follow button on the page. This drops the barrier to a follow, letting the user decide at the moment of interest.

This is a small way to put Twitter on your site. Anywhere can go further.

Read more: programmable web

Posted via email from jasper22's posterous

Using exception handling in VC++

|
As every Windows user, you probably have suffered more than one time from this annoying occurrence: You work on application, and then suddenly, without any reasonable explanation, the application crashes, and system message box appears on the screen, telling you that the application going to be terminated. This crash window varies from one operating system to another: In Windows 98, for example, the following text is displayed: 'This program has performed an illegal operation and will be shut down'. Windows 2000 and Windows NT, as opposed to previous versions of Windows, display the details of the problem that caused the exception. For example: 'The instruction at "0x00401000" referenced memory at "0x00000000" The memory could not be written.'
However, there is one common thing in all Windows operating system: In such event, you lose all your work you have done since the last save operation.

Background

Around a years back, while writing a huge app, (consisting around 93 internal projects), where there were around 15 threads were running constantly and communicating with each other, I'd faced several problems. Most of the time at the middle of the program, it was crashed.

This problem is mostly occurred due to a bug in the application itself, or in the one of the components or libraries of the operating system. luckily, the programmer has the ability to avoid this kind of annoying crashes, by applying a simple exception handling mechanism.

Borland Delphi development tool is a good example of effective crash handling: The executables created by this tool has a special build-in exception handling routines, so whenever an exception is occurred in a Delphi program, a special dialog-box of Delphi is displayed. This dialog-box contains some information about the problem that caused the exception. After the user clicks 'Ok', the program continues to run properly.

Visual C++ (as well as other development tools from Microsoft) doesn't provide an automatic exception handling module like Delphi, so if you want to avoid crashes in your C/C++ application, you have to explicitly add exception handling routines to your software.

Read more: Codeproject

Posted via email from jasper22's posterous

Recently Added Questions & Puzzles

|
   * Puzzle: Duplicate Lottery Picks: In the Massachusetts Megabucks lottery, six different numbers from 1 to 42 (inclusive) are selected...


   * Puzzle: Another Game of Dice : Your friend offers to play a game of dice with you. He explains the game to...


   * Puzzle: The Flawed Game: A teacher was having trouble getting her students to learn their facts, but she noticed that her students...


   * Analytical Questions: 5 houses in 5 colors: This puzzle was apparently written by Einstein in the last century. He said that 98% of the people in the world...


   * Analytical Questions: 5 Jars of pills: You have 5 jars of pills. Each pill weighs 10 grams...


   * Analytical Questions: One gold bar: You have someone working for you for seven days and you have one gold bar to pay...


   * Algorithms and Coding: Permutations: Write a function to print all the possible permutations...

Read more: Technical Interview

Posted via email from jasper22's posterous

Reading the SQL Server Error Logs

|
SQL Server error logs are the de facto error reporting location for all the SQL Server services. They provide information about the health of SQL Server that is not found anywhere else. If you want to check Windchill running on SQL Server, check the SQL Server error logs. The log contains a tremendous wealth of troubleshooting information, particularly if you're coming in fresh to a system you've not looked at for a while.

Here's a screenshot of the error log for an instance of SQL Server 2008 for reference, along with an enlarged version for easier reading.

The view in the screenshot is from Log File Viewer in SQL Server Management Studio. The log file entries are sorted with the oldest logs at the bottom. The actual error logs are just text files, so you can use Notepad or your favorite text editor to view the log files. By default, SQL Server keeps the current log plus the past six cycled logs. Log File Viewer tries to do some basic parsing and is handy because you can also merge in views of other logs, such as the Windows system logs.

Read more: PTC Windchill on SQL Server

Posted via email from jasper22's posterous

Introduction to Mono - ASP.NET with XSP and Apache

|
This article is the second article in the series of introductory articles that I am writing about Mono, the "open source development platform based on the .NET framework". In this article we'll take a look at how to get going with ASP.NET on the Mono platform. Although ASP.NET is not part of the ECMA and ISO standards mentioned in the first article[^], it is still one of the major selling points of the .NET platform and provides an extremely flexible and powerful platform for developing web applications and Web Services upon. Although you can develop ASP.NET applications for Mono on a number of different operating systems this article will focus mainly on Linux, although, in saying that, I do look briefly at getting XSP running on Windows. The reason I will concentrate on ASP.NET on Linux is because those people interested in ASP.NET on Windows have an extremely powerful option at their fingertips in the form IIS and I would whole heartedly recommend using it for ASP.NET on Windows.
Where does ASP.NET stand with Mono??

The latest stable version of Mono, version 1.0.5, has a fully functional implementation of ASP.NET. This includes full support for ASP.NET Web Forms and Web Services. This essentially means that more or less any ASP.NET application that you have developed using with the .NET Framework will work with Mono. Obviously there might be changes needed, such as data access changes, removal of any reliance on .NET Framework BCL types that are not implemented in Mono yet, and also the removal of any code that makes use of platform invoke and so on. At this stage the ASP.NET support in Mono can be considered as excellent and a lot of publicly available web applications already make use of Mono's ASP.NET support. According to the Mono site the Mono Web Services stack is being used in the source control application Vault[^] by SourceGear and aspects of Mono's ASP.NET implementation are also used in the Virtuoso[^] product from OpenLink.
What are XSP and mod_mono?

There isn't much point in developing web applications and Web Services if you have no way of serving them, is there? Traditionally you would use IIS to host ASP.NET applications on Windows, although there are some other free ASP.NET web servers available such as Cassini[^]. However, when using ASP.NET with Mono you have two main options as regards which web server to host your ASP.NET applications in:

   * XSP
   * Apache

In this article we look at using both XSP (on Windows and Linux) and Apache to host your ASP.NET web applications and Web Services.

Read more: Codeproject

Posted via email from jasper22's posterous

Additional.NET framework

|
Namespaces:

   * Td.Additional: Basis-Namespace, enthält nur sehr häufig benutzte und nicht einzuordnende Klassen
   * Td.Additional.Configuration: Enthält Klassen zur Verwaltung von Programm-Einstellungen
   * Td.Additional.Data: Vereinfacht den Zugriff auf Daten (Datenbanken, Dateien, ...)
   * Td.Additional.Net: Vereinfacht die Übertragung von Daten
   * Td.Additional.UI: Unterstützt die Ausgabe und Darstellung von Informationen (sowohl Bildschirm als auch Drucker)


Td.Additional-Projekt:

   * Td.Additional.Date: Zusätzliche Datums-Funktionen (Osterdatum, Kalenderwoche)
   * Td.Additional.Debug: Unterstützung beim Debuggen durch Console-Output und Logging
   * Td.Additional.EnumHelper: Bietet Unterstützung bei der Arbeit mit Enumerationen
   * Td.Additional.EventArgs: Generische EventArgs-Klasse
   * Td.Additional.TaggedString: Text mit optionalem Objekt, hilfreich z.B. für ListBox, ComboBox
   * Td.Additional.ComponentModel.DataErrorInfo: http://www.mycsharp.de/wbb2/thread.php?threadid=80530
   * Td.Additional.ComponentModel.NotifyPropertyChanged: http://www.mycsharp.de/wbb2/thread.php?threadid=80535
   * Td.Additional.Environment.CommandLineParser: Kommandozeilen-Parser, siehe Beispiel in TestApp
   * Td.Additional.IO.Directory: Verzeichnisse kopieren / verschieben
(more....)

Read more: Codeplex

Posted via email from jasper22's posterous

MonoMac Bindings: Blending Cocoa and .NET on OSX

|
Today we released MonoMac, a new foundation for building Cocoa applications on OSX using Mono.

MonoMac is the result of years of experimentation in blending .NET with Objective-C and is inspired by the same design principles that we used for MonoTouch.

It is also the result of weekend hacking as our day to day work revolves around Mono's efforts on Linux servers, Linux desktops, Visual Studio integration and our mobile efforts. Luckily, it shares some components with MonoTouch.

To get MonoMac, you need to get two modules from our subversion respository: monomac and maccore.
Background

Many years ago Geoff Norton produced CocoaSharp, the first set of .NET bindings to the Cocoa API. CocoaSharp was a fine first binding at the time and it was a good place to start learning about the challenges of binding Objective-C APIs to be consumed by .NET clients.

Over the years three other frameworks were created to integrate the Objective-C world and the Objective-C APIs with C# and other .NET languages. Each one of these new frameworks had its pros and cons, and a year ago we made a call for all three competing frameworks to be merged, but sadly nothing came out of it.

Read more: Miguel de Icaza's web log

Posted via email from jasper22's posterous

Persistent Subst’s – With a quick reg-hack you can use to make persistent SUBST drives

|
If you have touched DOS before, you might still remember what this old school command subst is all about. It’s a command used for substituting local paths on physical and logical drives, known as virtual drives. For example, if you want to have a logical drive P: mapped to a local folder on your computer, say c:\temp, you can simply use the following command to make it.

   subst p: c:\temp

It’s very useful when you test out the application that uses a network mapped drive so you can have a complete test environment right on your local machine.

If you want to make them like a permanent driver that doesn’t disappear, you can either

Create a new registry entry “string value” in the following key:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

The name of the entry should be “X:” where X is the drive letter you want to make.

And the value of the entry should be the local path in the form of: \??\c:\path

Read more: Greg's Cool [Insert Clever Name] of the Day

Posted via email from jasper22's posterous

Microsoft launches free Fix it Center

|
Microsoft has launched Fix it Center Beta, a PC and web based solutions help center. Fix it Center diagnosis common problems and finds solutions in a matter of seconds. For more complex issues, Fix it Center Online stores diagnosis data that Microsoft customer service agents can use to determine the steps users have already taken -- drastically reducing the amount of time spent on the phone with customer service.

Microsoft is particularly excited about the positive impact on the customer service experience Fix it Center will provide. MVPs who are already engaged in answering questions will have another tool in their tool box they can use to help in community forums.

Ina Fried from CNET wrote:

   Microsoft is testing a new "Fix it Center"--an online and PC-based tool for helping users solve their Windows technical problems. While a fair amount of diagnostics are built into Windows 7, the free Fix it Center aims to expand on these and also bring similar capabilities to Windows XP and Windows Vista.

Read more: The Microsoft MVP Award Program Blog
Official site: Fix it Center

Posted via email from jasper22's posterous

Announcing Silverlight for Symbian - Beta

|
 We are pleased to announce the public availability of Microsoft Silverlight for Symbian - Beta. Silverlight is a cross-browser, cross-platform implementation of the .NET Framework for creating media experiences and rich interactive applications for the Web on desktop computers and mobile phones. Silverlight beta contains an installer for Symbian ^1 (S60 5th edition) devices and developer tools for developing Silverlight applications on Nokia Symbian^1 mobile devices.

With this release, we have come one more step closer to bringing Silverlight to the Symbian platform that holds single largest market share in the Smartphone market and hence extend Silverlight reach to mobile devices. While Microsoft has done cross-platform work for Silverlight on the desktop, this is the first time Silverlight cross-platform work has been achieved on a non-Microsoft mobile platform.

This beta release is primarily focused towards the developer community so they can start building great experiences on mobile devices. If you're an existing Silverlight developer or you're new to Silverlight and would like to get started, the resources below will help you:

   * Learn about Silverlight - http://silverlight.net/
   * Download Silverlight for Symbian - Beta Developer Tools
   * Download Silverlight for Symbian - Beta (device installer)

Read more: Silverlight for Symbian Team Blog

Posted via email from jasper22's posterous

Interested in the thought of internally hosting the Microsoft Office 2010 Web Apps? Here’s an IT Guide for ya…

|
This document supports a preliminary release of Microsoft Office 2010 Beta. The content in the book covers information about how to plan, configure, deploy, maintain, secure, and troubleshoot installations of Microsoft Office 2010 Beta. The documentation is intended for IT professionals who plan, implement, and maintain Office installations in their organizations.

For current content that supports the released version of Microsoft Office 2010, see Office Web Apps 2010 technical library (http://go.microsoft.com/fwlink/?LinkId=181453).

Contents

Getting help    vii

Office Web Apps Beta (Installed on SharePoint 2010 Products    1

Newly published Office Web Apps content for    2
Published the week of February 22, 2010    2
Updated the week of February 22, 2010    2

Understanding Office Web Apps (Installed on SharePoint 2010 Products)    3
Office Web Apps versions    3
Integration with SharePoint    4
Understanding the Office Web Apps user experience    4
Viewing and editing Office documents    4
Improving the user experience with Silverlight    5
Configuring the default open behavior for browser enabled documents    5
Understanding Office Web Apps architecture    5
Understanding how Office Web Apps work    7
Viewing and editing Word documents using the Word Web App    7
Viewing and editing PowerPoint presentations using the PowerPoint Web App    7
PowerPoint Broadcast Slide Show presentations using the PowerPoint Web App    8
Viewing and editing Excel workbooks using the Excel Web App    9
Viewing and editing OneNote notebooks using the OneNote Web App    9

(more...)

Read more: Greg's Cool [Insert Clever Name] of the Day

Posted via email from jasper22's posterous

XP-More

|
Project Description
XP-More is a tool that helps manage Windows 7 Virtual Machines (XP Mode and any other). Specifically, it makes duplication of VMs a no brainer - no more raw XML editing and manually duplicating files.

What is Windows 7 Virtual Machine?
Windows 7 comes with a built-in virtual machine. Its first use is to provide backward compatibility by making a Windows XP SP3 VM available (known as XP Mode). However, other virtual machines can be created as well. The management of the virtual machines is done from a special folder, where virtual machines can be created, configured and launched.

Why is XP-More needed?
The built-in VM management capabilities are quite basic. If all you're looking for is an XP environment, you can make do with that. Whoever, if you'd like to duplicate existing VMs, there's some delicate manual work you'll have to do. That is, unless you have XP-More.

XP-More is a free and portable tool, which helps you manage your virtual machines. Want a new environment where you can test-drive the latest VS2010 RC? Want to create a backup of an existing installation before you make some changes? Just click a button, and your done.

Read more: Codeplex

Posted via email from jasper22's posterous

Force Caching With .htaccess Method To Increase Loading Speed Of Your Site

|
This hack will not increase the loading speed of your website directly. But instead, this will load the content of your site much faster when same user (returning visitor) visits your site again by sending 304 status for the components which have not been modified. Currently the cache expiry is set to one day, but you can change it accordingly by modifying the number of seconds, i.e. 86400 in our case.

This simple tutorial will help you achieve this in a snap.
Technique:

Note: Do take backup of your .htaccess(hypertext access) file.

01. Search for a file named .htaccess(hypertext access) in the webroot of your server (FTP) and can be easily edited using any text editor (like Notepad). Open it and add below code in it:
FileETag MTime Size
ExpiresActive on
ExpiresDefault “access plus 86400 seconds”

02. Save and you are done.

This concludes this simple and useful tutorial. Hope you like it.

Read more: tut zone

Posted via email from jasper22's posterous

SELECT INTO is faster than CREATE & INSERT

|
Before we directly jump to the topic, I would like to give a basic introduction of SELECT..INTO statement.

As, we know that, select into statement can be used to create new table with same table structure and to insert a base table rows in new table. We need to consider following things before using this.

1.       Column constraints are not gets created in new table
2.       If a selected column is computed then corresponding column in new table will not be computed column. The values in new columns are the values that were computed at the time SELECT…INTO was executed.
3.        SELECT…INTO statement does not cause blocking for duration of select statement.
4.       Generally, SELECT…INTO is measurably faster than separate create and insert statements. I will try to demonstrate the same in this post.

Following steps are performed. I have run this test on SQL 2005 sp3.

Step-1 Create Base table and populate default data.

IF object_id('IntoTestBaseTable') IS NOT NULL
   DROP TABLE IntoTestBaseTable;
GO

CREATE TABLE IntoTestBaseTable (
   c1 INT           ,
   c2 NVARCHAR (MAX)
);
GO

Read more: Beyond Rational

Posted via email from jasper22's posterous

Towards a Smaller .NET 4 - Details on the Client Profile and Downloading .NET

|
NOTE: All this info is for programmers/developers. If you just If you want .NET just to run stuff, just go get the 800k Web Installer for .NET 4 and you're all set. It'll do the rest. Now, that said...

Almost two years ago I blogged about how Microsoft was trying to make the size of the .NET Framework smaller and smaller. That day I made a site called http://www.smallestdotnet.com to help folks find the smallest download possible for their system.

I just noticed a post on the WPF Perf and .NET Client Profile blog that goes into a LOT of detail on how the .NET 4 Client Profile makes things smaller.

Before, the .NET 3.5 SP1 Client Profile was a good idea, but it wasn't really a first class citizen. It wonly worked on x86 and machines that didn't have .NET on them already. Some amount of time you'd end up having to get the full .NET install anyway. They say the focus on .NET 4 is on getting Client Applications to run as fast as possible with as few bits as possible.

Check this out from Jossef Goldberg's blog: "Unlike the NET 3.5 SP1 Client Profile, NET4 Client Profile is:"

   * Supported on all OS that Full is
   * Supported for x86 & x64
   * Client Profile is *the* framework that will be available on Windows Update for desktops
   * Supported in all aspect of VS (e.g. targeting, deployment project, etc)
   * Is the default target in almost all VS10 Client Project Templates (Winforms, WPF, VSTO, etc)

So that's good to know. They are committed to this and this will be the .NET 4 that gets distributed via Windows Update later this year. The general idea is that they avoid installing things you don't need a client machine. That means they won't install ASP.NET on your Mom's computer just because she wants a game. Also, the .NET 4 Client profile is a proper subset of the .NET 4 "Full" Framework.

Read more: Scott Hanselman's ComputerZen.com

Posted via email from jasper22's posterous

Solutions for Virtualizing Internet Explorer

|
The Windows® 7 operating system and its default browser, Windows® Internet Explorer® 8, offer many exciting new features and benefits. However, organizations may find that some of the older applications they rely on are not yet functional or supported in the new Windows 7 operating system. Microsoft provides several alternate ways to create a virtual operating environment on which you can run earlier versions of Internet Explorer. This white paper provides information to help you select the virtualization alternative that is appropriate for your organization.

Read more: MS Download

Posted via email from jasper22's posterous

JUST GOT THIS: New Silverlight 4 Training Kit Available

|
clip_image004_05277fe2-ced7-42bf-afef-92a39dac7b17.gif

Silverlight 4 Training Kit

We’ve just released a new free Silverlight 4 Training Kit that walks you through building business applications with Silverlight 4. You can also download the entire offline version of the kit here.  You can use the 8 modules, 25 videos, and several hands on labs online or offline from links on the Channel 9 site. I’ve included a breakdown and links to all of the content here in this post. The key to this training material is not the features it covers (though it covers a variety of them) but rather that it teaches from the perspective of building a business application.

Module 1 – Introduction

John Papa and Ian Griffiths discuss the key areas that the Building Business Applications with Silverlight 4 course focuses on. This module is the overview of the course which covers many key scenarios that are faced when building business applications and how Silverlight can help address them.

Module 2 – WCF RIA Services

In this lab, you will create a web site for managing conferences that will be the basis for the other labs in this course. (Don’t worry if you don’t manage to complete a particular lab. These lab manual instructions are accompanied by completed solutions, so you can either build your own solution from start to finish, or dive straight in at any point using the solutions provided as a starting point.) You will learn how to set up WCF RIA Services, create bindings to the domain context, filter using the domain data source, and create domain service queries.

   * Online Link: http://channel9.msdn.com/learn/courses/Silverlight4/SL4LOB_02_Event_Manager/
   * Download Source: http://ecn.channel9.msdn.com/o9/learn/Silverlight4/Labs/SL4LOB_02_Event_Manager/Source.zip
   * Download Lab Document: http://ecn.channel9.msdn.com/o9/learn/Silverlight4/Labs/SL4LOB_02_Event_Manager/SL4LOB_02_Event_Manager.docx

Videos

Module 2.1 - WCF RIA Services

Ian Griffiths sets up the Entity Framework and WCF RIA Services for the sample Event Manager application for the course. He covers how to set up the services, how the Domain Services work and the role that the DomainContext plays in the sample application. He also reviews the metadata classes and integrating the navigation framework.

Module 2.2 – Using WCF RIA Services to Edit Entities

Ian Griffiths discusses how he adds the ability to edit and create individual entities with the features built into WCF RIA Services into the sample Event Manager application. He covers data binding fundamentals, IQueryable, LINQ, the DomainDataSource, navigation to a single entity using the navigation framework, and how to use the Visual Studio designer to do much of the work .

Module 2.3 – Showing Master/Details Records Using WCF RIA Services

Ian Griffiths reviews how to display master/detail records for the sample Event Manager application using WCF RIA Services. He covers how to use the Include attribute to indicate which elements to serialize back to the client. Ian also demonstrates how to use the Data Sources window in the designer to add and bind controls to specific data elements. He wraps up by showing how to create custom services to the Domain Services.

Module 3 – Authentication, Validation, MVVM, Commands, Implicit Styles and RichTextBox

Read more: Public Sector Developer Weblog

Posted via email from jasper22's posterous