The mysteries of software development and networking... RSS 2.0



 Friday, June 30, 2006

I had a need for knowing which Microsoft Management Console snap-in's are available. A little digging on the Internet gave me:

Certificates certmgr.msc
Indexing Service ciadv.msc
Computer Management compmgmt.msc
Device Manager devmgmt.msc
Disk Defragmenter dfrg.msc
Disk Management diskmgmt.msc
Event Viewer eventvwr.msc
Shared Folders fsmgmt.msc
Group Policy gpedit.msc
Local Users and Groups lusrmgr.msc
Removable Storage ntmsmgr.msc
Removable Storage Operator Requests ntmsoprq.msc
Performance perfmon.msc
Resultant Set of Policy rsop.msc
Local Security Settings secpol.msc
Services services.msc
Windows Management Infrastructure (WMI) wmimgmt.msc
Component Services comexp.msc

.msc files are associated with MMC, so you can just run them.

On my machine, WindowsXP SP2, the Component Services snap-in (comexp.msc) is located in c:\windows\system32\Com which means I can't just go to [Start][Run] and enter comexp.msc to start.

Updated 6/30/2006: As my friend Kishor correctly points out, it is possible to start the Component Services management console by running dcomcnfg.exe

 

Friday, June 30, 2006 9:33:21 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1] -
General
 Friday, June 23, 2006

 

Yesterday I spoke at a meeting of the Maine Developer Network about building a Smart Client application using C# and .NET 2.0.

It was a two hour session where I used an application that is close to completion to show how to create a typed dataset, deliver the data to a client using webservices, consume the service and asynchronously use the data retrieved to send a newsletter using the .NET mail classes.

Go to the Maine Developer Network website to download the presentation.

 

 

 

 

Friday, June 23, 2006 3:04:16 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Tuesday, June 13, 2006

I knew it was possible, but never took the time to have a closer look at how to do it.

With embedded resources you can embed whole files (binary and text) in your assembly. Today I created a Console application that provides help when you pass the '/?' switch. The helpfile is a plain textfile, embedded in the assembly.

Here's how it is done:

  1. Add the textfile to your project.
  2. Set the property 'Build Action' to 'Embedded Resource'.
  3. Use code below to retrieve file as string.

private static string GetFileFromResources(string filename)
{
Assembly assembly;
assembly = Assembly.GetExecutingAssembly();
Stream stream =
assembly.GetManifestResourceStream("Type assembly namespace here" + "." + filename);
StreamReader sr = new StreamReader(stream);
string file = sr.ReadToEnd();
return file;
}

Tuesday, June 13, 2006 10:05:33 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General

Soma announced today that WinFX is being renamed to .NET Framework 3.0. Jason has more detailed info though.

WinFX will become .NET 3.0 while still running on the CLR 2.0. C# 3.0 will not be part of this release, but rather remain part of the 'Orcas'-release (scheduled for sometime 2007). I guess they'll have to rename it to C# 4.0.

Updated 6/13/2006: There is also a .NET 3.0 website at http://www.netfx3.com/

Tuesday, June 13, 2006 6:52:15 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
 Tuesday, June 06, 2006

I finished installing Vista beta 2 and Office 2007 beta 2 on my test machine. It all looks really cool, but sadly beta 2 does not yet include Virtual PC Express ER.

Not to be held back I downloaded Virtual PC 2004. But sadly this version won't run on Vista.

 

So I guess my move to upgrade to all beta stuff has just ground to a halt... :-(

Tuesday, June 06, 2006 10:13:31 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
General | Vista
 Monday, June 05, 2006

I'm in the process of upgrading my laptop to Windows Vista beta 2 and Office 2007 beta 2. Since I do all my development in VirtualPC mode, my first step will be to determine how well my VirtualPC images run on Vista.

I love the way the Vista Enterprise site provides the reader with an example of using Virtual PC Express:

"With Virtual PC Express, you can conveniently run two operating systems on a single computer through a virtual machine. While the latest operating system version (Microsoft Windows Vista Enterprise, for example) runs as a host, the other operating system (Microsoft Windows XP Professional, for example) runs as a guest in the virtual machine."

Well I'll be giving it a try.

Btw. for downloading Vista, WinFx and more, go to: http://msdn.microsoft.com/windowsvista/downloads/products/getthebeta/

Monday, June 05, 2006 12:46:59 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] -
General | Vista

In May we had Gregg Dunn and Bryan Beatty speak at the Maine Developer Network. Sadly I was away on business, but their powerpoints have been posted and provide some great info on Smart Clients and Object Relational Mapping.

Go to: Maine Developer Network - Presentations

Monday, June 05, 2006 7:43:45 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General
 Friday, June 02, 2006

For all the people who are looking for more info on Programming SQL Server 2005, now there is the book 'Programming SQL Server 2005' by William H. Zack and my friend Stephen Forte.

Friday, June 02, 2006 2:51:20 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Thursday, May 25, 2006

As a frequent traveller I have to deal with different time zones all the time. Today I ran into a great website which helps you with all sorts of information about which time zone a city is in, and also when daylight savings kicks in for that city.

Go to: www.timeanddate.com

Thursday, May 25, 2006 2:41:58 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Wednesday, May 24, 2006

Every now and again I run into a tool which is just amazingly stunning. Today I looked at the SeeSharp.nl blog and found an excellent tool called SQL Prompt by a company called Red Gate.

It is a free tool and definately worth the download if you write even one SQL statement per week!

Features include:

  • Code completion for fast, accurate script building
  • Discoverability in SQL Server query creation
  • Keyword formatting, code snippet integration other extended features
  • FREE until 1st September 2006
  • No time-bombs, no restrictions
  • Table/View name completion
  • Column name completion
  • Stored procedure name completion
  • USE completion
  • JOIN/JOIN ON completion
  • Auto-uppercasing of keywords
  • Auto-popup after keywords  
Wednesday, May 24, 2006 12:48:30 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Tuesday, May 23, 2006

The crew from DotNetRocks was present at the SDC2006 and they actually taped a live show for DotNetRocks.

Go to www.dotnetrocks.com to listen to our speakers and conference organizers.

On monday evening there was an on stage recording of the comedy podcast Mondays. Go to http://mondays.pwop.com/ to listen to this quite funny show.

Tuesday, May 23, 2006 3:01:13 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Friday, May 19, 2006

Living in the world of software we often try and solve all our performance issues by optimizing queries, fine tuning applications and generally looking at any point in the application which can be improved.

Being an architect also means looking outside the box, or maybe more accurately: at the box. What is the hardware and hardware environment that my system, my website, my webapplication is running in? There are some quite interesting hardware solutions to optimizing network traffic and minimizing server load. I've been recently approached by MRA Group and was so intrigued by the solutions that they offer that it didn't take much for me to become their VP Sales for North America.  

Strong points about the webacceleration solutions that we offer are that:

a) they are non-intrusive - no code needs to be changes
b) the solution is hardware based - it's a box!
c) the solution is easy to install, easy to manage - we offer a unique monitoring dashboard
d) the solution is a full service solution - you don't need to do anything.

Check out the website for more details:

 www.mra-group.com

 

Friday, May 19, 2006 12:50:39 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Webacceleration
 Wednesday, May 17, 2006

At the Software Developer Conference 2006 I presented a session on programming the CLR in SQL Server 2005.

Click below for the powerpoint.

SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
Wednesday, May 17, 2006 3:16:20 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Sunday, May 14, 2006

I'll be doing my SQL Server 2005 session at Software Developer Conference 2005 (www.sdc.nl) on Tuesday morning. Just surfing the web to see what info is out there I stumbled on a great MSDN article by a group of people (Balaji Rathakrishnan, Christian Kleinerman, Brad Richards, Ramachandran Venkatesh, Vineet Rao, Isaac Kunen)

Go here.

Sunday, May 14, 2006 5:44:55 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Tuesday, May 09, 2006

Another example.

public partial class StoredProcedures
{
  [Microsoft.SqlServer.Server.SqlProcedure]
  public static void PerformDomainCount()
  {
    SqlConnection conn = new SqlConnection();
    SqlDataReader reader = null;
    try
    {

    // use "Context Connection=true" to specify that you're
    // tagging along on the current connection
    // if you wish you could connect to an external
    // database
    conn.ConnectionString = "Context Connection=true";

    // You have to open the connection, which feels a little strange
    conn.Open();

    SqlCommand cmd = new SqlCommand();
    cmd.CommandText = "select count(*), dbo.ExtractDomain(email) from customers group by dbo.ExtractDomain(email)";
    cmd.Connection = conn;

    reader = cmd.ExecuteReader();
    SqlMetaData[] meta = DefineMetaData();
    SqlDataRecord record = new SqlDataRecord( meta );
    if ( reader.HasRows )
    {
      reader.Read();
      Copy( reader, record );
      SqlContext.Pipe.SendResultsStart( record );
      SqlContext.Pipe.SendResultsRow( record );
      while ( reader.Read() )
      {
        Copy( reader, record );
        SqlContext.Pipe.SendResultsRow( record );
      }
    }

    }
    catch ( Exception exception )
    {
      SqlContext.Pipe.Send( "ERROR: " + exception.Message );
    }
    finally
    { 
      // Close all
      reader.Close();
      conn.Close();
      if ( SqlContext.Pipe.IsSendingResults )
      {
        SqlContext.Pipe.SendResultsEnd();
      }
    }
  }

  private static SqlMetaData[] DefineMetaData()
  {
    SqlMetaData[] meta = new SqlMetaData[2];
    meta[0] = new SqlMetaData( "Count", SqlDbType.Int );
    meta[1] = new SqlMetaData( "Domain", SqlDbType.NVarChar, 50 );
    return meta;
  }

  private static void Copy(SqlDataReader reader, SqlDataRecord record)
  {
    record.SetSqlInt32( 0, reader.GetSqlInt32( 0 ) );
    record.SetSqlString( 1, reader.GetSqlString( 1 ) );
  }
}

Tuesday, May 09, 2006 1:37:03 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General

An example says it all.

[Microsoft.SqlServer.Server.SqlProcedure]
public static void PerformDomainCount()
{
SqlConnection conn = new SqlConnection();
// use "Context Connection=true" to specify that you're
// tagging along on the current connection
// if you wish you could connect to an external
// database
conn.ConnectionString = "Context Connection=true";

// You have to open the connection, which feels a little strange
conn.Open();


SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "select * from customers";

SqlDataReader reader = cmd.ExecuteReader();

// Send result to caller
SqlContext.Pipe.Send( reader );

// Close the connection
conn.Close();
}

Tuesday, May 09, 2006 1:07:23 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | General

If you want to run managed code in SQL Server 2005 you need to change the default setting for CLR Enabled from false to true.

To do this, run:

exec sp_configure 'clr enabled', '1'

reconfigure

 

 

Tuesday, May 09, 2006 1:06:07 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Monday, May 08, 2006

I generally don't bookmark too much, between the history in the address bar and Googling there is just little that requires it, today I found a link that is useful to check on a more regular basis though.

Microsoft has a page where you can find all the latest versions for their SDK's.

Link: http://www.microsoft.com/downloads/Browse.aspx?displaylang=en&aud=5&dctypeid=25

Monday, May 08, 2006 6:14:58 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Monday, May 01, 2006

My article on 'Getting started with WPF' has been published in the Software Developer Magazine and can also be read online at www.sdn.nl

Monday, May 01, 2006 11:27:07 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
WPF

The Maine Developer Network is a new .NET user group. Recently founded we organize a monthly meeting in Augusta, ME.

Interested? Read more on www.maine-devnet.org

Monday, May 01, 2006 10:11:37 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
About
This blog is run by Mark Blomsma.
© Copyright 2008
Develop-One
Sign In
Statistics
Total Posts: 337
This Year: 81
This Month: 0
This Week: 1
Comments: 94
All Content © 2008, Develop-One
DasBlog theme 'Business' created by Christoph De Baene (delarou)