I did some more research on the settings part of Windows Vista gadgets and storing username/passwords in plain text in your settings is not a smart thing to do.
You can use the JavaScript code below to do basic encryption and decryption.
function encrypt( plainString )
{
if ( plainString == "" ) return "";
var xor_key = 2;
var result = "";
for( i = 0; i < plainString.length; ++i)
{
result += String.fromCharCode( xor_key ^ plainString.charCodeAt(i) );
}
return result;
}
function decrypt( encryptedString )
{
if ( encryptedString == "" ) return "";
var xor_key = 2;
var result;
for( i = 0; i < encryptedString.length; i++)
{
result += String.fromCharCode( xor_key ^ encryptedString.charCodeAt(i));
}
return result;
}
Read more background info here.
A Windows Vista gadget is just a zipfile with at a specified location the 'gadget.xml' file.
A mistake I've been making repeatedly is that I right click the folder with my sources and choose 'Send to|Compressed Folder'. Doing this adds the selected folder to the zip. I rename the zip to have the '.gadget' extension and then install the gadget.
Result: nothing happens. :-(
At the 'root' of the zip is a folder with the name of the folder I selected, my sources are one level too deep for Vista to find?!
There is however zero feedback from Vista. Very frustrating. A message saying something like 'Invalid gadget: gadget.xml not found.' would be a big help.
I just finished working on my first Windows Vista gadget.
It's a small gadget which sits in the sidebar and shows the amount of free space on you AOL XDrive (5GB of free online space).

Download the gadget here.
Read more about the making of... on my AOL blog.
This week we, the SDN, organized the SDC 2007 (Software Developer Conference 2007). It's the 16th time we organized this two day conference and this year, like the years before, was a great success!!! We had 450 people at the conference with 30 internationally acclaimed speakers and great sponsors like Microsoft and Ordina.
Below a couple of pictures to give an impression of the event.
 Full rooms, people watching, listening, learning, absorbing, captured by the speaker.
 Speakers in the speakerroom getting ready for their next session (Kevin McNeish, Stephen Forte, Chad Hower, e.a.).
 Carl Franklin missed 2 flights and couldn't make it to the conferece, so no .NET Rocks show, but the crew of the Internet show Mondays was on site to provide entertainment on the Monday night of the conference (Richard Campbell, Mark Miller, Karen Greenwald).
I've completed a comprehensive sample application integrating Windows Communication Foundation, ASP.NET and TRUVEO search into a custom search engine. Check it out here.
Sometimes, like before starting a build, you want to see how many files are checked out, which pending changes there are and who still has pending work. VSTS does not offer a standard report for this, but you can use the tf.exe command line tool to query for this information: tf status "$/ProjectName" /server:ServerName /recursive /user:*
I needed to export all rights granted to a specific role from a SQL Server 2005 database in order to check these roles into our TFS server. /*
Script : ExportRole.sql
Version : 1.0
Date : 11-09-2007
Author : Mark Blomsma, Develop-One (www.develop-one.com)
Desc. : Export all rights for a role from a SQL Server 2005 database.
Including Service Broker messages, contracts and services.
*/
-- Role is the parameter for this procedure
DECLARE @Role VARCHAR(40)
SET @Role = 'Rolename goes here'
-- Retrieve the roleid for the role which we need to export
DECLARE @RoleId int
SELECT
@RoleId = dp.principal_id
FROM
sys.database_principals dp
WHERE
dp.name = @Role
-- Declare a temp table for collecting results.
-- Each grant statement will be a line in the results table.
DECLARE @Result
TABLE
(
Line VARCHAR(256)
)
-- Use the current database
INSERT INTO
@Result (Line)
VALUES
('USE [' + DB_NAME() + ']')
-- Declare variable for retrieving data from cursor
DECLARE
@permission_type char(4),
@permission_name sysname,
@object_name sysname,
@object_type char(2),
@type_desc nvarchar(60)
-- Declare object cursor for retrieving rights on database objects.
DECLARE objectCursor CURSOR LOCAL FORWARD_ONLY READ_ONLY FOR
SELECT
p.type AS permission_type,
p.permission_name,
o.name,
o.type AS object_type,
o.type_desc
FROM
sys.database_permissions AS p
INNER JOIN
sys.objects AS o ON p.major_id = o.object_id
WHERE
(p.grantee_principal_id = @RoleId)
AND (
p.state = 'G'
OR
p.state = 'W'
)
ORDER BY
o.type, o.name
OPEN
objectCursor;
-- Fetch first row with object permissions
FETCH NEXT FROM
objectCursor
INTO
@permission_type,
@permission_name,
@object_name,
@object_type,
@type_desc
-- Loop through object permissions
WHILE @@FETCH_STATUS = 0
BEGIN
-- Insert permission into results
INSERT INTO
@Result (Line)
VALUES
('GRANT ' + @permission_name + ' ON [' + @object_name + '] TO [' + @Role + '];')
-- Fetch next row
FETCH NEXT FROM
objectCursor
INTO
@permission_type,
@permission_name,
@object_name,
@object_type,
@type_desc
END
-- Cleanup cursor
CLOSE
objectCursor
DEALLOCATE
objectCursor
-- Declare object cursor for retrieving rights on message types.
DECLARE messagetypeCursor CURSOR LOCAL FORWARD_ONLY READ_ONLY FOR
SELECT DISTINCT
p.type AS permission_type,
p.permission_name,
mt.name
FROM
sys.database_permissions AS p
INNER JOIN
sys.service_message_types AS mt ON p.major_id = mt.message_type_id
WHERE
(p.grantee_principal_id = @RoleId)
AND (
p.state = 'G'
OR
p.state = 'W'
)
ORDER BY
mt.name
OPEN
messagetypeCursor;
-- Fetch first row with message type permissions
FETCH NEXT FROM
messagetypeCursor
INTO
@permission_type,
@permission_name,
@object_name
-- Loop through message type permissions
WHILE @@FETCH_STATUS = 0
BEGIN
-- Insert permission into results
INSERT INTO
@Result (Line)
VALUES
('GRANT ' + @permission_name + ' ON MESSAGE TYPE :: [' + @object_name + '] TO [' + @Role + '];')
-- Fetch next row
FETCH NEXT FROM
messagetypeCursor
INTO
@permission_type,
@permission_name,
@object_name
END
-- Cleanup cursor
CLOSE
messagetypeCursor
DEALLOCATE
messagetypeCursor
-- Declare object cursor for retrieving rights on contracts.
DECLARE contractCursor CURSOR LOCAL FORWARD_ONLY READ_ONLY FOR
SELECT DISTINCT
p.type AS permission_type,
p.permission_name,
c.name
FROM
sys.database_permissions AS p
INNER JOIN
sys.service_contracts AS c ON p.major_id = c.service_contract_id
WHERE
(p.grantee_principal_id = @RoleId)
AND (
p.state = 'G'
OR
p.state = 'W'
)
ORDER BY
c.name
OPEN
contractCursor;
-- Fetch first row with message type permissions
FETCH NEXT FROM
contractCursor
INTO
@permission_type,
@permission_name,
@object_name
-- Loop through message type permissions
WHILE @@FETCH_STATUS = 0
BEGIN
-- Insert permission into results
INSERT INTO
@Result (Line)
VALUES
('GRANT ' + @permission_name + ' ON CONTRACT :: [' + @object_name + '] TO [' + @Role + '];')
-- Fetch next row
FETCH NEXT FROM
contractCursor
INTO
@permission_type,
@permission_name,
@object_name
END
-- Cleanup cursor
CLOSE
contractCursor
DEALLOCATE
contractCursor
-- Declare object cursor for retrieving rights on services.
DECLARE serviceCursor CURSOR LOCAL FORWARD_ONLY READ_ONLY FOR
SELECT DISTINCT
p.type AS permission_type,
p.permission_name,
s.name
FROM
sys.database_permissions AS p
INNER JOIN
sys.services AS s ON p.major_id = s.service_id
WHERE
(p.grantee_principal_id = @RoleId)
AND (
p.state = 'G'
OR
p.state = 'W'
)
ORDER BY
s.name
OPEN
serviceCursor;
-- Fetch first row with message type permissions
FETCH NEXT FROM
serviceCursor
INTO
@permission_type,
@permission_name,
@object_name
-- Loop through message type permissions
WHILE @@FETCH_STATUS = 0
BEGIN
-- Insert permission into results
INSERT INTO
@Result (Line)
VALUES
('GRANT ' + @permission_name + ' ON SERVICE :: [' + @object_name + '] TO [' + @Role + '];')
-- Fetch next row
FETCH NEXT FROM
serviceCursor
INTO
@permission_type,
@permission_name,
@object_name
END
-- Cleanup cursor
CLOSE
serviceCursor
DEALLOCATE
serviceCursor
SELECT
*
FROM
@Result
Useful change to know about.
In SQL Server 2000 you needed quite some permissions (SS2000: TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and are not transferable.)
In SQL Server 2005 you're allowed to perform a truncate table as soon as you have 'ALTER' permissions on that table.
Microsoft has created a very cool experimental interface for searching the web, implementing a Silverlight based userinterface on top of Live Search.
Testdrive it at: http://www.tafiti.com
I've just posted a new blog entry on my AOL blog. I think it turned out really cool!
I use Windows Communication Foundation 3.5 (beta 2) to create a service contract, data contract and client channel and then connect to a non WCF, REST based service.
More on: http://dev.aol.com/node/595.
Just 26 days to go until the Software Developer Conference 2007.
Have you signed up yet?
We're proud to have an excellent lineup of speakers. The current list of speakers:
More info: http://www.sdc.nl/
I just installed two new Vista sidebar gadgets:
Visual Studio 2008 Global Launch Wave - this gadget counts down to the launch of VS2008.
SDC 2007 - this gadget counts down to the start of the annual software conference organized by the SDN.

Chris Bowen blogs about the registration of Code Camp 8 being open! A great event for the New England and Maine developers!
Code Camp 8: Rise of the Silverlight Surfer will be held at the Microsoft offices in Waltham, MA on the weekend of September 29th and 30th. Registration at 8:30 AM, sessions start at 9:00. As always, it's a completely free event (and you'll probably walk away with some swag as well.)
Read my AOL post on using XmlDocument to invoke the REST based AOL Video Search here.
My publishing agent, StudioB, has landed me a great job as part the AOL blogging team and the AOL editiorial board. AOL has a number of cool service based API's, like AOL Video Search, AIM, OpenAuth and manu more. I'll be writing articles and blog posts about using these API's in C# and .NET.
I've been given my own blog space on http://dev.aol.com, check it out at: http://dev.aol.com/blog/22109.
Microsoft Visual Studio 2005 Team Edition for Database Professionals Power Tools has been released and is available at: http://www.microsoft.com/downloads/details.aspx?FamilyID=da3f11ad-bd54-4eda-b08c-4df84df0d641&displaylang=en
The Microsoft Visual Studio 2005 Team Edition for Database Professionals Power Tools is a set of enhancements and tools that compliment and improve the user experience of Team Edition for Database Professionals.
This release includes 5 new refactoring types, a new dependency viewer, additional data generators and editors, 2 new MSBuild tasks for Schema and Data Compare as well as the introduction of the TSQL Static Code Analysis feature
TSQL Static Code Analysis • Static Code Analysis - A precursor to the functionality that will be in future versions of VSTS that will allow you to perform Static Code Analysis on T-SQL code.
Refactoring • “Move Schema” Refactoring - Allows a user to right click on an object and move it to a different but existing schema • SP Rename Generation - Generate a new script that will contain sp_renames for all rename refactored objects that the user can then execute. • Wildcard Expansion - Automatically expand the wildcard in a select to the appropriate columns. • Fully-Qualified Name Support - Automatically inject fully-qualified names when absent in a script • Refactoring extended to Dataset - Refactor into strongly typed dataset definitions
MSBuild Tasks • Data / Schema Compare Build Tasks - MSBuild tasks that can generate scripts as if the user had run the Data / Schema compare UI
Schema View • API Access to Schema View - Insert / Update / Delete to schema View and list schema objects and their associated files
Dependency Tool Window • Dependency Tree - Show the dependencies ( incoming / outgoing ) for selected schema objects in a new tool window
Miscellaneous Tools • Script Preprocessor - Expand SQLCMD variables and include files and command line version (sqlspp.exe) & an MSBuild version ( wraps the command line version )
Big companies, like Amazon and AOL, offering 'Software as a Service' seem to focus on REST more than on SOAP. Having a Microsoft background myself I found this strange... ASP.NET webservices work great, so therefor why not use SOAP?
The number one great thing about REST is the ability to easily test a service by... typing the URL in you browser. This will at least allow you to test the GET operation on your REST service.
Microsoft's number one dude on SOAP, Don Box seems to be moving away from SOAP himself (or is he running?). Below is an abstract of Don's words during Microsoft Tech Summit 07 taken from Ben Galbraith's blog. Read the full item here.
Q: What is the future of REST?
Don: Interesting word that means different things to different people, such as:
1. Get the WSDL and XSD out of my face 2. Get the SOAP out of my face 3. Put the URI in my face 4. Respect GET 5. Embrace PUT and DELETE
“It turns out a lot of the headache people have with Web Services or WS-* is tied to XSD. XSD is more flawed than most technologies that roam the earth. I was on the committee that created it, and that was back when I made my money explaining complicated technologies to people for money, and man, I could hear the cash registers ringing in my ears.”
“Now my job is making things simple, which is unfortunate since I’m stuck with XSD.”
“XSD was a standard-committee driven piece of ####ing crap.”
“If you’re Sun, if you’re Microsoft, if you’re IBM, you can just throw a bunch of engineers in a room and make it all work. Sun is committed to making their stuff interop with WCF with Project Tango. But if you’re Matz, or DHH, or Larry Wall, you’re screwed, because you don’t have time to build out this stack and then make it interoperate.”
|