Thursday, August 31, 2006

Syndication Icons

Identify synicated content with the standard icons. Harmonize - Customize - Stanardize:



But where do I find the official icon for ATOM ?

Saturday, August 26, 2006

Profile your SQL Express 'User Instance'

In the free SQL Server 2005 Express Edition , you get a new connection string parameter 'User instance=true'.

"data source=.\SQLEXPRESS;Integrated Security=SSPI;
AttachDBFilename=|DataDirectory|people.mdf;User Instance=true"



When this parameter is specified, SQL Express will create another instance of the sqlservr.exe process on the client. This process is running in the security context of the currently logged on user. The connection object passed back to the client is connected to this new user child instance, running as a client process in the user's security context.

More details about User Instances? Read this excellent article on msdn: Working with User Instances

SQL Profiler

For monitoring purposes (what's going on under the hood, troubleshooting and more), the SQL Server Profiler acts as a big time safer. The Profiler is able to read and display all the traffic between the client (e.g. a custom-application, SQL Management Studio etc.) and the SQL Server. Just attach the Profiler to a running SQL Server instance.

But how to attach to a 'user instance', where you don't have a well known instance name?

First, query the master database from SQL Express as follows:



There you get the named pipes per instance. You get the heart-beat as well: alive or dead (if the Lifetime of a User Instance Connection has timed out; default is 60 minutes).

Second, connect with the pipe (just alive instances can be connected):



Third, get the traffic, sniff, profile...



You get the Profiler together with Workgroup-, Standard- and Enterprise edition.

SQL Server Management Studio / SQL Server Management Express

This solution will work for SQL Server Management Studio as well:



The Management Studio does display all attached Databases(in my case AspNetDB.MDF and People.MDF). - There is the free Version SQL Server Management Studio Express.

Searching for a used string?

... then checkout this page http://www.connectionstrings.com/ ;~)

SQL 2005 Service Manager

With "SQL 2005 Service Manager" you can easily manage different SQL Services.

Local on my dev-machine, I have SQL2k5, SQLExpress nad SQL2k installed and by default, this services are not started when the OS starts. I don't need SQLServer every day, so they shouldn't block memory.



Thanks to this free tool, it's handy and easy to manage (start, pause, stop) the different SQLServices on the different SQLServers.

This Tool and more codes and articles you will find at http://www.sqldbatips.com/


Thursday, August 24, 2006

GhostDoc

GhostDoc is a free add-in for Visual Studio that automatically generates XMLdocumentation comments for C#.

After you have installed the software, just move the cursor into properties and methods and call the "Document this" command either using the context menu or by pressing the hotkey (if you assigned one).

Here is a sample, where all the comment is generated by GhostDoc:

/// <summary> 

/// Initializes a new instance of the class. 

/// </summary> 

/// <param>name="id": The id.</param> 

/// <param> name="name": The name. </param> 

/// <param> name="latitude": The latitude. </param> 

/// <param> name="longitude": The longitude. </param>

/// <param> name="category": The category. </param>

/// <param> name="imageUrl": The image URL. </param>

/// <param> name="infoURL": The more info URL. </param> 

/// <param> name="description": The description. </param> 

public void MapItemRow(int id, string name, double latitude, double longitude, string category, string imageUrl, string moreInfoUrl, string description)

{ }

Wednesday, August 23, 2006

Google's Beta Blogger (new Version)



New Features:
  • New Templates
  • Comfortable Template customizing
  • Mutliple authors
  • Private accessible blog
  • Support for RSS 2.0, Atom 1.0
  • Updated Dashboard
  • Instant publishing
  • more

Take a tour: http://www.blogger.com/beta-tour.g

Here is the link "HowTo Migrate to Blogger Beta": http://www.blogger.com/migrate-login.do
Interested in Google data API: http://code.blogger.com

This Blog is already migrated to Blogger Beta. One disadvantage @ the moment: The HTML-Template can not changed manually, so I could not migrate stuff like Hit Counter and additional inserted HTML. - But support for this is promised and should coming soon...

ADAM - Policies...

We use ADAM (Active Directory Application Mode) for a project. To insert some users into the directory, we have written VB-Scripts. Everything worked well in our dev-environment.

But... during the setup at the customer company, we couldn't connect with the admin-user created by our VB-Script. Error-Message: 'Credentials not valid'. What happended!?

There were local policies installed, and the admin-user password didn't meet the minimal requirements, so the account was automatically disabled, without any message!

That's okay from the security point of view. But f****** hard to debug for a developer, escpecially with error messages like 'Credentials not valid'. And a kind of plain-text adsi-editor with hundrets of attributes:



After resetting the attribut "msDS-UserAccountDisabled" to false, everthing worked as expected.

Set Code Analyze on multiple projects

In a large solution, setting the Code Analyze stuff (aka FxCop) on each project via Property-Dialog is quite annoying. Lenny Bacon ("de Späck-Lenny") has written a nice macro, to get the job done:

http://www.lennybacon.com/PermaLink,guid,64276d86-b1ec-4999-a1c2-309af9d8ea79.aspx

Copy as HTML from VS2005

Nice add-in for VS2005. Usefull if you want to publish Code-Sequences into your blog or other html-related containters:

http://jasonhaley.com/blog/archive/2005/12/27/131246.aspx

Hattrick.org - Background Informations

Hattrick (also known internally simply as HT) is an online, browser-based, football management game. Over 860'000 (!) users are managing their team in 112 Countries, using 36 different language versions. The Solution is ASP-based, developed and maintained by 14 employees from the swedish company ExtraLives AB.

Interested in more information? http://en.wikipedia.org/wiki/Hattrick

Sunday, August 13, 2006

Microsoft Sandcastle - 'NDoc by Microsoft'

Easy generated Source Code Documentation out of the xml-comments is now possible with the new MS Tool Sandcastle. Till now, NDoc was the first joice for me. But Sandcastle sounds like a real alternative - especially because of real .NET 2.0 support.

Mission Statement:
Enable managed class library developers throughout the world to easily create accurate, informative documentation with a common look and feel.

Sandcastle is used internally to build .Net Framework documentation.

Sandcastle Overview:

  • Produces quality, comprehensive, familiar MSDN-like documentation.
  • Works with or without authored comments.
  • Supports Generics and .NET Framework 2.0
  • Sandcastle MrefBuilder generates reflection xml file
  • Sandcastle Build Assembler includes syntax generation, transformation..etc

Sandcastle Blog, Sandcastle Download

Thursday, August 10, 2006

ASP.NET Display ViewState-Size

The ViewState in ASP.NET is saved in a hidden formfield by default. His size can be dangerous high, even though ASP.NET 2.0 has cut the ViewState in half because of better (thanks to the new formatter class, ObjectStateFormatter). If ViewState Size is to high and you get problems passing the firewall, take a look at this.

Here a solution to display the current size of the ViewState inside the browsers statusbar:


protected override void OnPreRenderComplete(EventArgs e)

{

    if (DebugFlag)

    {

        this.ClientScript.RegisterClientScriptBlock(

            this.GetType(),

            "DisplayViewState",

            "<script>window.status = 'ViewState: ' + document.forms[0]['__VIEWSTATE'].value.length + ' bytes';</script>");

    }

}



Put this code in your CodeBehind or in your Web-Base-Page (a page derived from System.Web.UI.Page).

If you are not happy with your ViewState Size, take a look at ViewState Numbers and Solutions to reduce ViewState Size as documented here. Keeping the ViewState on the Server (e.g. via SessionState) instead of the client is one way.